diff options
author | Peter Wemm <peter@FreeBSD.org> | 2002-05-21 05:30:25 +0000 |
---|---|---|
committer | Peter Wemm <peter@FreeBSD.org> | 2002-05-21 05:30:25 +0000 |
commit | 39f2269fcb4873fd97d70af944ec49f4230fadea (patch) | |
tree | bd986d58f5a6e348466b5362637ba93e6cd5bf8c /contrib/ncurses/ncurses/base/lib_ungetch.c | |
parent | 7e6a63408cfb0b48f0e41f77ed82f5d0ca60bda5 (diff) | |
download | src-39f2269fcb4873fd97d70af944ec49f4230fadea.tar.gz src-39f2269fcb4873fd97d70af944ec49f4230fadea.zip |
Import ncurses-5.2-20020518 onto the vendor branch.
Obtained from: ftp://dickey.his.com/ncurses/
Notes
Notes:
svn path=/vendor/ncurses/dist/; revision=97049
Diffstat (limited to 'contrib/ncurses/ncurses/base/lib_ungetch.c')
-rw-r--r-- | contrib/ncurses/ncurses/base/lib_ungetch.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/contrib/ncurses/ncurses/base/lib_ungetch.c b/contrib/ncurses/ncurses/base/lib_ungetch.c index d28d3de8bff8..ba057c043901 100644 --- a/contrib/ncurses/ncurses/base/lib_ungetch.c +++ b/contrib/ncurses/ncurses/base/lib_ungetch.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,2000 Free Software Foundation, Inc. * + * Copyright (c) 1998,2000,2001 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 * @@ -40,7 +40,7 @@ #include <curses.priv.h> -MODULE_ID("$Id: lib_ungetch.c,v 1.4 2000/12/10 02:43:27 tom Exp $") +MODULE_ID("$Id: lib_ungetch.c,v 1.7 2001/12/29 23:01:09 tom Exp $") #include <fifo_defs.h> @@ -51,15 +51,17 @@ _nc_fifo_dump(void) int i; T(("head = %d, tail = %d, peek = %d", head, tail, peek)); for (i = 0; i < 10; i++) - T(("char %d = %s", i, _trace_key(SP->_fifo[i]))); + T(("char %d = %s", i, _tracechar(SP->_fifo[i]))); } #endif /* TRACE */ NCURSES_EXPORT(int) ungetch(int ch) { + T((T_CALLED("ungetch(%d)"), ch)); + if (tail == -1) - return ERR; + returnCode(ERR); if (head == -1) { head = 0; t_inc() @@ -73,5 +75,5 @@ ungetch(int ch) if (_nc_tracing & TRACE_IEVENT) _nc_fifo_dump(); #endif - return OK; + returnCode(OK); } |