"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/prompt.c" between
tin-2.6.0.tar.xz and tin-2.6.1.tar.xz

About: TIN is a threaded NNTP and spool based UseNet newsreader.

prompt.c  (tin-2.6.0.tar.xz):prompt.c  (tin-2.6.1.tar.xz)
/* /*
* Project : tin - a Usenet reader * Project : tin - a Usenet reader
* Module : prompt.c * Module : prompt.c
* Author : I. Lea * Author : I. Lea
* Created : 1991-04-01 * Created : 1991-04-01
* Updated : 2021-07-14 * Updated : 2021-10-29
* Notes : * Notes :
* *
* Copyright (c) 1991-2021 Iain Lea <iain@bricbrac.de> * Copyright (c) 1991-2022 Iain Lea <iain@bricbrac.de>
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
* *
* 1. Redistributions of source code must retain the above copyright notice, * 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer. * this list of conditions and the following disclaimer.
* *
* 2. Redistributions in binary form must reproduce the above copyright * 2. Redistributions in binary form must reproduce the above copyright
skipping to change at line 175 skipping to change at line 175
t_function func; t_function func;
#if defined(MULTIBYTE_ABLE) && !defined(NO_LOCALE) #if defined(MULTIBYTE_ABLE) && !defined(NO_LOCALE)
wint_t yes, no, prompt_ch, ch; wint_t yes, no, prompt_ch, ch;
#else #else
char yes, no, prompt_ch; char yes, no, prompt_ch;
int ch; int ch;
#endif /* MULTIBYTE_ABLE && !NO_LOCALE */ #endif /* MULTIBYTE_ABLE && !NO_LOCALE */
/* fflush(stdin); */ /* Prevent finger trouble from making imp ortant decisions */ /* fflush(stdin); */ /* Prevent finger trouble from making imp ortant decisions */
#if defined(MULTIBYTE_ABLE) && !defined(NO_LOCALE)
yes = (wint_t) func_to_key(PROMPT_YES, prompt_keys); yes = (wint_t) func_to_key(PROMPT_YES, prompt_keys);
no = (wint_t) func_to_key(PROMPT_NO, prompt_keys); no = (wint_t) func_to_key(PROMPT_NO, prompt_keys);
#if defined(MULTIBYTE_ABLE) && !defined(NO_LOCALE)
printascii(keyyes, (default_answer ? towupper(yes) : yes)); printascii(keyyes, (default_answer ? towupper(yes) : yes));
printascii(keyno, (!default_answer ? towupper(no) : no)); printascii(keyno, (!default_answer ? towupper(no) : no));
#else #else
yes = func_to_key(PROMPT_YES, prompt_keys);
no = func_to_key(PROMPT_NO, prompt_keys);
printascii(keyyes, (default_answer ? my_toupper(yes) : yes)); printascii(keyyes, (default_answer ? my_toupper(yes) : yes));
printascii(keyno, (!default_answer ? my_toupper(no) : no)); printascii(keyno, (!default_answer ? my_toupper(no) : no));
#endif /* MULTIBYTE_ABLE && !NO_LOCALE */ #endif /* MULTIBYTE_ABLE && !NO_LOCALE */
keyyes_len = strwidth(keyyes); keyyes_len = strwidth(keyyes);
keyno_len = strwidth(keyno); keyno_len = strwidth(keyno);
maxlen = MAX(keyyes_len, keyno_len); maxlen = MAX(keyyes_len, keyno_len);
prompt_len = keyyes_len + keyno_len + maxlen + 6; prompt_len = keyyes_len + keyno_len + maxlen + 6;
prompt_yn_message = my_strdup(prompt); prompt_yn_message = my_strdup(prompt);
prompt_yn_choice = my_malloc(prompt_len + 1); prompt_yn_choice = my_malloc(prompt_len + 1);
input_context = cPromptYN; input_context = cPromptYN;
do { do {
 End of changes. 6 change blocks. 
3 lines changed or deleted 7 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)