~ubuntu-branches/debian/sid/ncurses/sid-200908151543

« back to all changes in this revision

Viewing changes to include/capdefaults.c

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Baumann
  • Date: 2008-12-14 21:06:00 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20081214210600-2rdjwvpplgvh3zeb
Tags: 5.7+20081213-1
MergingĀ upstreamĀ versionĀ 5.7+20081213.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/****************************************************************************
2
 
 * Copyright (c) 1998-2000 Free Software Foundation, Inc.                   *
 
2
 * Copyright (c) 1998-2000,2008 Free Software Foundation, Inc.              *
3
3
 *                                                                          *
4
4
 * Permission is hereby granted, free of charge, to any person obtaining a  *
5
5
 * copy of this software and associated documentation files (the            *
29
29
/****************************************************************************
30
30
 *  Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995               *
31
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
 
36
37
    /*
37
38
     * Compute obsolete capabilities.  The reason this is an include file is
44
45
     */
45
46
{
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
52
 
51
53
    /* current (4.4BSD) capabilities marked obsolete */
52
54
    if (VALID_STRING(carriage_return)
73
75
        magic_cookie_glitch_ul = magic_cookie_glitch;
74
76
 
75
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
80
    if (VALID_STRING(cursor_left)
79
81
        && (capval = EXTRACT_DELAY(cursor_left)))
80
82
        backspace_delay = capval;