summary refs log tree commit diff
path: root/manual/examples
diff options
context:
space:
mode:
authorRafe Kettler <rafe.kettler@gmail.com>2012-02-18 00:10:47 +0000
committerJoseph Myers <joseph@codesourcery.com>2012-02-18 00:12:10 +0000
commit09c093b500d5a002d6b420f5972e5469f115ea36 (patch)
treea1a6fd8d3456035c0af0b5127650be5fbca3ddad /manual/examples
parent2ee633a2433eb937c1dbd9646789af46aba50831 (diff)
downloadglibc-09c093b500d5a002d6b420f5972e5469f115ea36.tar.gz
glibc-09c093b500d5a002d6b420f5972e5469f115ea36.tar.xz
glibc-09c093b500d5a002d6b420f5972e5469f115ea36.zip
Make declarations of "main" in examples consistent.
Diffstat (limited to 'manual/examples')
-rw-r--r--manual/examples/argp-ex1.c3
-rw-r--r--manual/examples/argp-ex2.c3
-rw-r--r--manual/examples/argp-ex3.c3
-rw-r--r--manual/examples/argp-ex4.c3
-rw-r--r--manual/examples/longopt.c4
-rw-r--r--manual/examples/strncat.c3
-rw-r--r--manual/examples/subopt.c2
7 files changed, 12 insertions, 9 deletions
diff --git a/manual/examples/argp-ex1.c b/manual/examples/argp-ex1.c
index 7bb5f2241c..931a8264a5 100644
--- a/manual/examples/argp-ex1.c
+++ b/manual/examples/argp-ex1.c
@@ -8,7 +8,8 @@
 #include <stdlib.h>
 #include <argp.h>
 
-int main (int argc, char **argv)
+int
+main (int argc, char **argv)
 {
   argp_parse (0, argc, argv, 0, 0, 0);
   exit (0);
diff --git a/manual/examples/argp-ex2.c b/manual/examples/argp-ex2.c
index c49fbaca94..097ce7622c 100644
--- a/manual/examples/argp-ex2.c
+++ b/manual/examples/argp-ex2.c
@@ -38,7 +38,8 @@ static char doc[] =
    option will print out @code{argp_program_version}.  */
 static struct argp argp = { 0, 0, 0, doc };
 
-int main (int argc, char **argv)
+int
+main (int argc, char **argv)
 {
   argp_parse (&argp, argc, argv, 0, 0, 0);
   exit (0);
diff --git a/manual/examples/argp-ex3.c b/manual/examples/argp-ex3.c
index a8a48ea685..d5896ee139 100644
--- a/manual/examples/argp-ex3.c
+++ b/manual/examples/argp-ex3.c
@@ -129,7 +129,8 @@ parse_opt (int key, char *arg, struct argp_state *state)
 /* Our argp parser.  */
 static struct argp argp = { options, parse_opt, args_doc, doc };
 
-int main (int argc, char **argv)
+int
+main (int argc, char **argv)
 {
   struct arguments arguments;
 
diff --git a/manual/examples/argp-ex4.c b/manual/examples/argp-ex4.c
index 8628a235dd..2b61358c7e 100644
--- a/manual/examples/argp-ex4.c
+++ b/manual/examples/argp-ex4.c
@@ -131,7 +131,8 @@ parse_opt (int key, char *arg, struct argp_state *state)
 /* Our argp parser.  */
 static struct argp argp = { options, parse_opt, args_doc, doc };
 
-int main (int argc, char **argv)
+int
+main (int argc, char **argv)
 {
   int i, j;
   struct arguments arguments;
diff --git a/manual/examples/longopt.c b/manual/examples/longopt.c
index 1661327f53..989e88713e 100644
--- a/manual/examples/longopt.c
+++ b/manual/examples/longopt.c
@@ -6,9 +6,7 @@
 static int verbose_flag;
 
 int
-main (argc, argv)
-     int argc;
-     char **argv;
+main (int argc, char **argv)
 {
   int c;
 
diff --git a/manual/examples/strncat.c b/manual/examples/strncat.c
index f865167f4a..948d662a4e 100644
--- a/manual/examples/strncat.c
+++ b/manual/examples/strncat.c
@@ -5,7 +5,8 @@
 
 static char buffer[SIZE];
 
-main ()
+int
+main (void)
 {
   strncpy (buffer, "hello", SIZE);
   puts (buffer);
diff --git a/manual/examples/subopt.c b/manual/examples/subopt.c
index 287fe8c495..a87bee1669 100644
--- a/manual/examples/subopt.c
+++ b/manual/examples/subopt.c
@@ -27,7 +27,7 @@ const char *mount_opts[] =
 };
 
 int
-main (int argc, char *argv[])
+main (int argc, char **argv)
 {
   char *subopts, *value;
   int opt;