projects
/
gapil.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Correzioni
[gapil.git]
/
sources
/
getparam.c
diff --git
a/sources/getparam.c
b/sources/getparam.c
index 54212e35b386e7c31c807f54f3963673f42e879e..f44f51d9016775ecb557a940bf00e330fcd8da5d 100644
(file)
--- a/
sources/getparam.c
+++ b/
sources/getparam.c
@@
-19,15
+19,13
@@
/****************************************************************
*
* Program getparam.c:
/****************************************************************
*
* Program getparam.c:
- * Program to
test function fopen
+ * Program to
read system parameters
*
* Author: Simone Piccardi
* Jan. 2002
*
* Usage: getparam -h give all info's
*
*
* Author: Simone Piccardi
* Jan. 2002
*
* Usage: getparam -h give all info's
*
- * $Id: getparam.c,v 1.1 2002/01/03 23:44:14 piccardi Exp $
- *
****************************************************************/
/*
* Include needed headers
****************************************************************/
/*
* Include needed headers
@@
-36,12
+34,11
@@
#include <errno.h> /* error definitions and routines */
#include <stdlib.h> /* C standard library */
#include <unistd.h> /* unix standard library */
#include <errno.h> /* error definitions and routines */
#include <stdlib.h> /* C standard library */
#include <unistd.h> /* unix standard library */
-#include <string.h> /*
string functions
*/
-#include <limits.h>
-#include <stdio.h>
-
+#include <string.h> /*
C strings library
*/
+#include <limits.h>
/* system limits constants, types and functions */
+#include <stdio.h>
/* standard I/O library */
+#include <time.h> /* date and time constants, types and functions */
-#include <time.h> /* for CLK_TCK e CLOCKS_PER_SEC */
/* Table of constants for sysconf() */
char *sc_names[]={"_SC_ARG_MAX",
/* Table of constants for sysconf() */
char *sc_names[]={"_SC_ARG_MAX",
@@
-110,10
+107,11
@@
int defined[]={
0,
#endif
#ifdef SSIZE_MAX
0,
#endif
#ifdef SSIZE_MAX
- 1
+ 1
,
#else
#define SSIZE_MAX -1
0
#else
#define SSIZE_MAX -1
0
+#endif
};
};
@@
-169,7
+167,6
@@
int main(int argc, char *argv[])
* Main code beginning
*
* ***********************************************************/
* Main code beginning
*
* ***********************************************************/
- /* There must be 2 remaing parameters */
if ( (argc-optind) != 1 ) {
printf("From %d arguments, removed %d options\n", argc, optind);
usage();
if ( (argc-optind) != 1 ) {
printf("From %d arguments, removed %d options\n", argc, optind);
usage();
@@
-184,9
+181,9
@@
int main(int argc, char *argv[])
* routine to print usage info and exit
*/
void usage(void) {
* 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("Usage:\n");
- printf("
testfopen [-h] file mode
\n");
+ printf("
getparam [-h] parameter
\n");
printf(" -h print this help\n");
exit(1);
printf(" -h print this help\n");
exit(1);