X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=include%2Fcapdefaults.c;h=da76cc1d7a57d8d7fad3679cd70c21e31888f710;hp=071f9e17cdbb427da028f3724274285eea1d8706;hb=d803343ca3e2a419085e76fc9f04a6fbd14498b8;hpb=b1f61d9f3aa244512045a6b02e759825d7049d34 diff --git a/include/capdefaults.c b/include/capdefaults.c index 071f9e17..da76cc1d 100644 --- a/include/capdefaults.c +++ b/include/capdefaults.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2000 Free Software Foundation, Inc. * + * Copyright (c) 1998-2000,2008 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -29,9 +29,10 @@ /**************************************************************************** * Author: Zeyd M. Ben-Halim 1992,1995 * * and: Eric S. Raymond * + * and: Thomas E. Dickey 1996-on * ****************************************************************************/ -/* $Id: capdefaults.c,v 1.12 2000/01/02 02:34:56 tom Exp $ */ +/* $Id: capdefaults.c,v 1.14 2008/11/16 00:19:59 juergen Exp $ */ /* * Compute obsolete capabilities. The reason this is an include file is @@ -43,10 +44,11 @@ * postprocess_termcap(). */ { - char *sp; - int capval; + char *strp; + short capval; -#define EXTRACT_DELAY(str) (sp = strchr(str, '*'), sp ? atoi(sp+1) : 0) +#define EXTRACT_DELAY(str) \ + (short) (strp = strchr(str, '*'), strp ? atoi(strp+1) : 0) /* current (4.4BSD) capabilities marked obsolete */ if (VALID_STRING(carriage_return) @@ -73,8 +75,8 @@ magic_cookie_glitch_ul = magic_cookie_glitch; /* totally obsolete capabilities */ - linefeed_is_newline = VALID_STRING(newline) - && (strcmp("\n", newline) == 0); + linefeed_is_newline = (char) (VALID_STRING(newline) + && (strcmp("\n", newline) == 0)); if (VALID_STRING(cursor_left) && (capval = EXTRACT_DELAY(cursor_left))) backspace_delay = capval;