]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
man/: EXAMPLES: Add missing 'static'
authorAlejandro Colomar <alx@kernel.org>
Fri, 14 Mar 2025 17:46:51 +0000 (18:46 +0100)
committerAlejandro Colomar <alx@kernel.org>
Fri, 14 Mar 2025 17:47:24 +0000 (18:47 +0100)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
man/man2/sigaction.2
man/man3/atexit.3
man/man3/ctime.3
man/man3/fopencookie.3

index aeefd57f9f4bfc6eee0197193c30b6d808235fe8..1654d43be142461fa9a4fafb0eeccad3824ad32e 100644 (file)
@@ -1181,7 +1181,7 @@ otherwise.
 #include <stdlib.h>
 #include <unistd.h>
 \&
-void
+static void
 handler(int signo, siginfo_t *info, void *context)
 {
     struct sigaction oldact;
index f35d268074b7b5f7603e3943f0dd5a0a2d7f9783..ce69deca35990ab0d8c78e7590dd3706cf113253 100644 (file)
@@ -137,7 +137,7 @@ that are called when the shared library is unloaded.
 #include <stdlib.h>
 #include <unistd.h>
 \&
-void
+static void
 bye(void)
 {
     printf("That was all, folks\[rs]n");
index c2d14269cac23d011b14906ceb9677ccf4735eb1..e23a70c04e12946056e11cd27fc5448817b80f3c 100644 (file)
@@ -536,7 +536,7 @@ a.out: my_mktime: Invalid argument
 \&
 #define is_signed(T)  ((T) \-1 < 1)
 \&
-time_t my_mktime(struct tm *tp);
+static time_t my_mktime(struct tm *tp);
 \&
 int
 main(int argc, char *argv[])
@@ -575,7 +575,7 @@ main(int argc, char *argv[])
     exit(EXIT_SUCCESS);
 }
 \&
-time_t
+static time_t
 my_mktime(struct tm *tp)
 {
     int            e, isdst;
index 62ae015e076e323d7a65e73fe0e1af221fd154a5..a0ae197b0fba838bcccf13d311ce67253f6b2f81 100644 (file)
@@ -303,7 +303,7 @@ struct memfile_cookie {
     off_t   offset;     /* Current file offset in buf */
 };
 \&
-ssize_t
+static ssize_t
 memfile_write(void *c, const char *buf, size_t size)
 {
     char *new_buff;
@@ -328,7 +328,7 @@ memfile_write(void *c, const char *buf, size_t size)
     return size;
 }
 \&
-ssize_t
+static ssize_t
 memfile_read(void *c, char *buf, size_t size)
 {
     ssize_t xbytes;
@@ -348,7 +348,7 @@ memfile_read(void *c, char *buf, size_t size)
     return xbytes;
 }
 \&
-int
+static int
 memfile_seek(void *c, off_t *offset, int whence)
 {
     off_t new_offset;
@@ -371,7 +371,7 @@ memfile_seek(void *c, off_t *offset, int whence)
     return 0;
 }
 \&
-int
+static int
 memfile_close(void *c)
 {
     struct memfile_cookie *cookie = c;