X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=include%2Fcapdefaults.c;h=33f2fe8f029909a71105646fa442b822e74d4937;hp=071f9e17cdbb427da028f3724274285eea1d8706;hb=e70a86c3d48b8cbad0f6d1c33ba5b027a243834e;hpb=b1f61d9f3aa244512045a6b02e759825d7049d34 diff --git a/include/capdefaults.c b/include/capdefaults.c index 071f9e17..33f2fe8f 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.13 2008/08/04 12:33:42 tom Exp $ */ /* * Compute obsolete capabilities. The reason this is an include file is @@ -44,9 +45,10 @@ */ { char *sp; - int capval; + short capval; -#define EXTRACT_DELAY(str) (sp = strchr(str, '*'), sp ? atoi(sp+1) : 0) +#define EXTRACT_DELAY(str) \ + (short) (sp = strchr(str, '*'), sp ? atoi(sp+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;