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

« back to all changes in this revision

Viewing changes to ncurses/base/lib_printw.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-2005,2009 Free Software Foundation, Inc.              *
 
2
 * Copyright (c) 1998-2003,2005 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            *
39
39
 
40
40
#include <curses.priv.h>
41
41
 
42
 
MODULE_ID("$Id: lib_printw.c,v 1.19 2009/04/18 18:45:55 tom Exp $")
 
42
MODULE_ID("$Id: lib_printw.c,v 1.18 2006/12/17 19:21:39 tom Exp $")
43
43
 
44
44
NCURSES_EXPORT(int)
45
45
printw(const char *fmt,...)
128
128
{
129
129
    char *buf;
130
130
    int code = ERR;
131
 
#if NCURSES_SP_FUNCS
132
 
    SCREEN *sp = _nc_screen_of(win);
133
 
#endif
134
131
 
135
132
    T((T_CALLED("vwprintw(%p,%s,va_list)"), win, _nc_visbuf(fmt)));
136
133
 
137
 
    buf = NCURSES_SP_NAME(_nc_printf_string) (NCURSES_SP_ARGx fmt, argp);
138
 
    if (buf != 0) {
 
134
    if ((buf = _nc_printf_string(fmt, argp)) != 0) {
139
135
        code = waddstr(win, buf);
140
136
    }
141
137
    returnCode(code);