X-Git-Url: http://ncurses.scripts.mit.edu/?a=blobdiff_plain;f=progs%2Ftput.c;h=8745cc9977ad5b447d3ddf774f1291e7383a6f7b;hb=1078c0231b8a58fbd2dd56b6e0a81b19d6b07f77;hp=47e4c20174a75ebd9c99e963053f66b1cf8d8a09;hpb=027ae42953e3186daed8f3882da73de48291b606;p=ncurses.git diff --git a/progs/tput.c b/progs/tput.c index 47e4c201..8745cc99 100644 --- a/progs/tput.c +++ b/progs/tput.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. * + * Copyright (c) 1998-2006,2007 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 * @@ -38,6 +38,7 @@ * Ross Ridge's mytinfo package. */ +#define USE_LIBTINFO #include #if !PURE_TERMINFO @@ -45,7 +46,7 @@ #endif #include -MODULE_ID("$Id: tput.c,v 1.38 2006/11/26 00:27:47 tom Exp $") +MODULE_ID("$Id: tput.c,v 1.41 2007/10/13 20:34:16 tom Exp $") #define PUTS(s) fputs(s, stdout) #define PUTCHAR(c) putchar(c) @@ -325,6 +326,7 @@ tput(int argc, char *argv[]) case Num_Str_Str: s = TPARM_3(s, numbers[1], strings[2], strings[3]); break; + case Numbers: default: (void) _nc_tparm_analyze(s, p_is_s, &popcount); #define myParam(n) (p_is_s[n - 1] != 0 ? ((long) strings[n]) : numbers[n]) @@ -363,7 +365,7 @@ main(int argc, char **argv) term = getenv("TERM"); - while ((c = getopt(argc, argv, "ST:V")) != EOF) { + while ((c = getopt(argc, argv, "ST:V")) != -1) { switch (c) { case 'S': cmdline = FALSE;