From: fujishita t. <fjs...@us...> - 2017-05-11 10:45:54
|
Update of /cvsroot/sp-tk/SPTK/src/bin/echo2 In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv14375 Modified Files: echo2.c Log Message: modify -n option Index: echo2.c =================================================================== RCS file: /cvsroot/sp-tk/SPTK/src/bin/echo2/echo2.c,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** echo2.c 22 Dec 2016 10:53:02 -0000 1.25 --- echo2.c 11 May 2017 10:45:52 -0000 1.26 *************** *** 52,56 **** * echo2 [ options ] * * options: * ! * -n : no output newline [TRUE] * * * ************************************************************************/ --- 52,56 ---- * echo2 [ options ] * * options: * ! * -n : no output newline [FALSE] * * * ************************************************************************/ *************** *** 80,84 **** /* Default Values */ ! #define NEWLINE TR char *BOOL[] = { "FALSE", "TRUE" }; --- 80,84 ---- /* Default Values */ ! #define NONEWLINE FA char *BOOL[] = { "FALSE", "TRUE" }; *************** *** 95,99 **** fprintf(stderr, " %s [ options ]\n", cmnd); fprintf(stderr, " options:\n"); ! fprintf(stderr, " -n : no output newline [%s]\n", BOOL[NEWLINE]); fprintf(stderr, " -h : print this message\n"); #ifdef PACKAGE_VERSION --- 95,99 ---- fprintf(stderr, " %s [ options ]\n", cmnd); fprintf(stderr, " options:\n"); ! fprintf(stderr, " -n : no output newline [%s]\n", BOOL[NONEWLINE]); fprintf(stderr, " -h : print this message\n"); #ifdef PACKAGE_VERSION *************** *** 108,112 **** int main(int argc, char **argv) { ! int newline = NEWLINE; if ((cmnd = strrchr(argv[0], '/')) == NULL) --- 108,112 ---- int main(int argc, char **argv) { ! int nonewline = NONEWLINE; if ((cmnd = strrchr(argv[0], '/')) == NULL) *************** *** 118,122 **** switch (*(*argv + 1)) { case 'n': ! newline = 1 - newline; break; case 'h': --- 118,122 ---- switch (*(*argv + 1)) { case 'n': ! nonewline = 1 - nonewline; break; case 'h': *************** *** 133,137 **** } ! if (newline) putc('\n', stderr); --- 133,137 ---- } ! if (!nonewline) putc('\n', stderr); |