capdefaults.c (62450) | capdefaults.c (184989) |
---|---|
1/**************************************************************************** | 1/**************************************************************************** |
2 * Copyright (c) 1998-2000 Free Software Foundation, Inc. * | 2 * Copyright (c) 1998-2000,2008 Free Software Foundation, Inc. * |
3 * * 4 * Permission is hereby granted, free of charge, to any person obtaining a * 5 * copy of this software and associated documentation files (the * 6 * "Software"), to deal in the Software without restriction, including * 7 * without limitation the rights to use, copy, modify, merge, publish, * 8 * distribute, distribute with modifications, sublicense, and/or sell * 9 * copies of the Software, and to permit persons to whom the Software is * 10 * furnished to do so, subject to the following conditions: * --- 13 unchanged lines hidden (view full) --- 24 * holders shall not be used in advertising or otherwise to promote the * 25 * sale, use or other dealings in this Software without prior written * 26 * authorization. * 27 ****************************************************************************/ 28 29/**************************************************************************** 30 * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 * 31 * and: Eric S. Raymond <esr@snark.thyrsus.com> * | 3 * * 4 * Permission is hereby granted, free of charge, to any person obtaining a * 5 * copy of this software and associated documentation files (the * 6 * "Software"), to deal in the Software without restriction, including * 7 * without limitation the rights to use, copy, modify, merge, publish, * 8 * distribute, distribute with modifications, sublicense, and/or sell * 9 * copies of the Software, and to permit persons to whom the Software is * 10 * furnished to do so, subject to the following conditions: * --- 13 unchanged lines hidden (view full) --- 24 * holders shall not be used in advertising or otherwise to promote the * 25 * sale, use or other dealings in this Software without prior written * 26 * authorization. * 27 ****************************************************************************/ 28 29/**************************************************************************** 30 * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 * 31 * and: Eric S. Raymond <esr@snark.thyrsus.com> * |
32 * and: Thomas E. Dickey 1996-on * |
|
32 ****************************************************************************/ 33 | 33 ****************************************************************************/ 34 |
34/* $Id: capdefaults.c,v 1.12 2000/01/02 02:34:56 tom Exp $ */ | 35/* $Id: capdefaults.c,v 1.13 2008/08/04 12:33:42 tom Exp $ */ |
35 36 /* 37 * Compute obsolete capabilities. The reason this is an include file is 38 * that the two places where it's needed want the macros to generate 39 * offsets to different structures. See the file Caps for explanations of 40 * these conversions. 41 * 42 * Note: This code is the functional inverse of the first part of 43 * postprocess_termcap(). 44 */ 45{ 46 char *sp; | 36 37 /* 38 * Compute obsolete capabilities. The reason this is an include file is 39 * that the two places where it's needed want the macros to generate 40 * offsets to different structures. See the file Caps for explanations of 41 * these conversions. 42 * 43 * Note: This code is the functional inverse of the first part of 44 * postprocess_termcap(). 45 */ 46{ 47 char *sp; |
47 int capval; | 48 short capval; |
48 | 49 |
49#define EXTRACT_DELAY(str) (sp = strchr(str, '*'), sp ? atoi(sp+1) : 0) | 50#define EXTRACT_DELAY(str) \ 51 (short) (sp = strchr(str, '*'), sp ? atoi(sp+1) : 0) |
50 51 /* current (4.4BSD) capabilities marked obsolete */ 52 if (VALID_STRING(carriage_return) 53 && (capval = EXTRACT_DELAY(carriage_return))) 54 carriage_return_delay = capval; 55 if (VALID_STRING(newline) && (capval = EXTRACT_DELAY(newline))) 56 new_line_delay = capval; 57 --- 10 unchanged lines hidden (view full) --- 68 reset_2string = ABSENT_STRING; 69 } 70 if (magic_cookie_glitch_ul == ABSENT_NUMERIC 71 && magic_cookie_glitch != ABSENT_NUMERIC 72 && VALID_STRING(enter_underline_mode)) 73 magic_cookie_glitch_ul = magic_cookie_glitch; 74 75 /* totally obsolete capabilities */ | 52 53 /* current (4.4BSD) capabilities marked obsolete */ 54 if (VALID_STRING(carriage_return) 55 && (capval = EXTRACT_DELAY(carriage_return))) 56 carriage_return_delay = capval; 57 if (VALID_STRING(newline) && (capval = EXTRACT_DELAY(newline))) 58 new_line_delay = capval; 59 --- 10 unchanged lines hidden (view full) --- 70 reset_2string = ABSENT_STRING; 71 } 72 if (magic_cookie_glitch_ul == ABSENT_NUMERIC 73 && magic_cookie_glitch != ABSENT_NUMERIC 74 && VALID_STRING(enter_underline_mode)) 75 magic_cookie_glitch_ul = magic_cookie_glitch; 76 77 /* totally obsolete capabilities */ |
76 linefeed_is_newline = VALID_STRING(newline) 77 && (strcmp("\n", newline) == 0); | 78 linefeed_is_newline = (char) (VALID_STRING(newline) 79 && (strcmp("\n", newline) == 0)); |
78 if (VALID_STRING(cursor_left) 79 && (capval = EXTRACT_DELAY(cursor_left))) 80 backspace_delay = capval; 81 if (VALID_STRING(tab) && (capval = EXTRACT_DELAY(tab))) 82 horizontal_tab_delay = capval; 83#undef EXTRACT_DELAY 84} | 80 if (VALID_STRING(cursor_left) 81 && (capval = EXTRACT_DELAY(cursor_left))) 82 backspace_delay = capval; 83 if (VALID_STRING(tab) && (capval = EXTRACT_DELAY(tab))) 84 horizontal_tab_delay = capval; 85#undef EXTRACT_DELAY 86} |