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

« back to all changes in this revision

Viewing changes to ncurses/tinfo/lib_termcap.c

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Baumann
  • Date: 2008-11-05 21:34:00 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20081105213400-7d9r3jj2ngz18k24
Tags: 5.7-1
* Merging upstream version 5.7.
* Updating soname and sodepver to 5.7 in rules.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/****************************************************************************
2
 
 * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
 
2
 * Copyright (c) 1998-2007,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            *
30
30
 *  Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995               *
31
31
 *     and: Eric S. Raymond <esr@snark.thyrsus.com>                         *
32
32
 *     and: Thomas E. Dickey                        1996-on                 *
33
 
 *     and: Juergen Pfeifer                                                 *
34
33
 *                                                                          *
35
34
 * some of the code in here was contributed by:                             *
36
35
 * Magnus Bengtsson, d6mbeng@dtek.chalmers.se (Nov'93)                      *
46
45
 
47
46
#include <term_entry.h>
48
47
 
49
 
#ifndef CUR
50
 
#define CUR SP_TERMTYPE
51
 
#endif
52
 
 
53
 
MODULE_ID("$Id: lib_termcap.c,v 1.66 2009/05/23 23:47:34 tom Exp $")
 
48
MODULE_ID("$Id: lib_termcap.c,v 1.63 2008/08/16 19:22:55 tom Exp $")
54
49
 
55
50
NCURSES_EXPORT_VAR(char *) UP = 0;
56
51
NCURSES_EXPORT_VAR(char *) BC = 0;
81
76
 ***************************************************************************/
82
77
 
83
78
NCURSES_EXPORT(int)
84
 
NCURSES_SP_NAME(tgetent) (NCURSES_SP_DCLx char *bufp, const char *name)
 
79
tgetent(char *bufp, const char *name)
85
80
{
86
81
    int errcode;
87
82
    int n;
116
111
             */
117
112
            if (LAST_TRM != 0 && LAST_TRM != cur_term) {
118
113
                TERMINAL *trm = LAST_TRM;
119
 
                NCURSES_SP_NAME(del_curterm) (NCURSES_SP_ARGx LAST_TRM);
 
114
                del_curterm(LAST_TRM);
120
115
                for (CacheInx = 0; CacheInx < TGETENT_MAX; ++CacheInx)
121
116
                    if (LAST_TRM == trm)
122
117
                        LAST_TRM = 0;
169
164
        LAST_BUF = bufp;
170
165
        LAST_USE = TRUE;
171
166
 
172
 
        SetNoPadding(SP_PARM);
173
 
        (void) NCURSES_SP_NAME(baudrate) (NCURSES_SP_ARG);      /* sets ospeed as a side-effect */
 
167
        SetNoPadding(SP);
 
168
        (void) baudrate();      /* sets ospeed as a side-effect */
174
169
 
175
170
/* LINT_PREPRO
176
171
#if 0*/
182
177
    returnCode(errcode);
183
178
}
184
179
 
185
 
#if NCURSES_SP_FUNCS
186
 
NCURSES_EXPORT(int)
187
 
tgetent(char *bufp, const char *name)
188
 
{
189
 
    return NCURSES_SP_NAME(tgetent) (CURRENT_SCREEN, bufp, name);
190
 
}
191
 
#endif
192
 
 
193
180
/***************************************************************************
194
181
 *
195
182
 * tgetflag(str)
200
187
 ***************************************************************************/
201
188
 
202
189
NCURSES_EXPORT(int)
203
 
NCURSES_SP_NAME(tgetflag) (NCURSES_SP_DCLx NCURSES_CONST char *id)
 
190
tgetflag(NCURSES_CONST char *id)
204
191
{
205
192
    unsigned i;
206
193
 
218
205
    returnCode(0);              /* Solaris does this */
219
206
}
220
207
 
221
 
#if NCURSES_SP_FUNCS
222
 
NCURSES_EXPORT(int)
223
 
tgetflag(NCURSES_CONST char *id)
224
 
{
225
 
    return NCURSES_SP_NAME(tgetflag) (CURRENT_SCREEN, id);
226
 
}
227
 
#endif
228
 
 
229
208
/***************************************************************************
230
209
 *
231
210
 * tgetnum(str)
236
215
 ***************************************************************************/
237
216
 
238
217
NCURSES_EXPORT(int)
239
 
NCURSES_SP_NAME(tgetnum) (NCURSES_SP_DCLx NCURSES_CONST char *id)
 
218
tgetnum(NCURSES_CONST char *id)
240
219
{
241
220
    unsigned i;
242
221
 
255
234
    returnCode(ABSENT_NUMERIC);
256
235
}
257
236
 
258
 
#if NCURSES_SP_FUNCS
259
 
NCURSES_EXPORT(int)
260
 
tgetnum(NCURSES_CONST char *id)
261
 
{
262
 
    return NCURSES_SP_NAME(tgetnum) (CURRENT_SCREEN, id);
263
 
}
264
 
#endif
265
 
 
266
237
/***************************************************************************
267
238
 *
268
239
 * tgetstr(str, area)
273
244
 ***************************************************************************/
274
245
 
275
246
NCURSES_EXPORT(char *)
276
 
NCURSES_SP_NAME(tgetstr) (NCURSES_SP_DCLx NCURSES_CONST char *id, char **area)
 
247
tgetstr(NCURSES_CONST char *id, char **area)
277
248
{
278
249
    unsigned i;
279
250
    char *result = NULL;
307
278
    returnPtr(result);
308
279
}
309
280
 
310
 
#if NCURSES_SP_FUNCS
311
 
NCURSES_EXPORT(char *)
312
 
tgetstr(NCURSES_CONST char *id, char **area)
313
 
{
314
 
    return NCURSES_SP_NAME(tgetstr) (CURRENT_SCREEN, id, area);
315
 
}
316
 
#endif
317
 
 
318
281
#if NO_LEAKS
319
282
NCURSES_EXPORT(void)
320
283
_nc_tgetent_leaks(void)