From: Simone Piccardi Date: Fri, 26 May 2006 10:55:55 +0000 (+0000) Subject: Correzione alle scritte di help di getparam, e aggiunto banale programmino X-Git-Url: https://gapil.gnulinux.it/gitweb/?a=commitdiff_plain;h=74c66811fb64b02f6c9228e885717ba52ac3a934;p=gapil.git Correzione alle scritte di help di getparam, e aggiunto banale programmino che aspetta indefinitamente. --- diff --git a/sources/getparam.c b/sources/getparam.c index 5619c1f..6410bb5 100644 --- a/sources/getparam.c +++ b/sources/getparam.c @@ -19,7 +19,7 @@ /**************************************************************** * * Program getparam.c: - * Program to test function fopen + * Program to read system parameters * * Author: Simone Piccardi * Jan. 2002 @@ -110,10 +110,11 @@ int defined[]={ 0, #endif #ifdef SSIZE_MAX - 1 + 1, #else #define SSIZE_MAX -1 0 +#endif }; @@ -169,7 +170,6 @@ int main(int argc, char *argv[]) * Main code beginning * * ***********************************************************/ - /* There must be 2 remaing parameters */ if ( (argc-optind) != 1 ) { printf("From %d arguments, removed %d options\n", argc, optind); usage(); @@ -184,9 +184,9 @@ int main(int argc, char *argv[]) * routine to print usage info and exit */ void usage(void) { - printf("Program testfopen : test fopen for a file \n"); + printf("Program getparam : test fopen for a file \n"); printf("Usage:\n"); - printf(" testfopen [-h] file mode \n"); + printf(" getparam [-h] parameter \n"); printf(" -h print this help\n"); exit(1); diff --git a/sources/pause.c b/sources/pause.c new file mode 100644 index 0000000..9e4d9f7 --- /dev/null +++ b/sources/pause.c @@ -0,0 +1,39 @@ +/* pause.c + * + * Copyright (C) 2006 Simone Piccardi + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/**************************************************************** + * + * Program pause.c: + * A simple program that call pause, and wait indefinitely + * + * Author: Simone Piccardi + * Mar. 2002 + * + ****************************************************************/ +/* + * Include needed headers + */ +#include /* unix standard library */ + +int main(int argc, char *argv[]) +{ +/* + * Variables definition + */ + return pause(); +}