Hi! I have added a duffman(1) program (script) to the Linux man-pages repo. It is similar to diffman(1), but it diffs the git working directory (or a commit, if specified). Here are a couple of examples. A change in the working directory: alx@devuan:~/src/linux/man-pages/man-pages/contrib$ git diff diff --git i/man/man3/printf.3 w/man/man3/printf.3 index 2129e26dc..a379ae609 100644 --- i/man/man3/printf.3 +++ w/man/man3/printf.3 @@ -24,7 +24,7 @@ .SH SYNOPSIS .nf .B #include <stdio.h> .P -.BI "int printf(const char *restrict " format ", ...);" +.BI "int foo(const char *restrict " format ", ...);" .BI "int fprintf(FILE *restrict " stream , .BI " const char *restrict " format ", ...);" .BI "int dprintf(int " fd , alx@devuan:~/src/linux/man-pages/man-pages/contrib$ duffman --- HEAD:man/man3/printf.3 +++ man/man3/printf.3 @@ -10,7 +10,7 @@ SYNOPSIS #include <stdio.h> - int printf(const char *restrict format, ...); + int foo(const char *restrict format, ...); int fprintf(FILE *restrict stream, const char *restrict format, ...); int dprintf(int fd, (The actual output includes bold and italics.) And with an old commit: alx@devuan:~/src/linux/man-pages/man-pages/contrib$ git show 437e4afec6ca commit 437e4afec6cae16ba75587f835acee1e251f2e75 Author: Alejandro Colomar <alx@xxxxxxxxxx> Date: Sun Jan 5 13:44:32 2025 +0100 man/man3/sem_open.3: SYNOPSIS: This is a variadic function Specify the prototype consistently with open(2). Signed-off-by: Alejandro Colomar <alx@xxxxxxxxxx> diff --git a/man/man3/sem_open.3 b/man/man3/sem_open.3 index 6a2aceb50..35275a024 100644 --- a/man/man3/sem_open.3 +++ b/man/man3/sem_open.3 @@ -15,9 +15,8 @@ .SH SYNOPSIS .BR "#include <sys/stat.h>" " /* For mode constants */" .B #include <semaphore.h> .P -.BI "sem_t *sem_open(const char *" name ", int " oflag ); -.BI "sem_t *sem_open(const char *" name ", int " oflag , -.BI " mode_t " mode ", unsigned int " value ); +.BI "sem_t *sem_open(const char *" name ", int " oflag ", ..." +.BI " \fR/*\fP mode_t " mode ", unsigned int " value " \fR*/\fP );" .fi .SH DESCRIPTION .BR sem_open () alx@devuan:~/src/linux/man-pages/man-pages/contrib$ duffman 437e4afec6ca --- 437e4afec6ca^:man/man3/sem_open.3 +++ 437e4afec6ca:man/man3/sem_open.3 @@ -11,9 +11,8 @@ #include <sys/stat.h> /* For mode constants */ #include <semaphore.h> - sem_t *sem_open(const char *name, int oflag); - sem_t *sem_open(const char *name, int oflag, - mode_t mode, unsigned int value); + sem_t *sem_open(const char *name, int oflag, ... + /* mode_t mode, unsigned int value */ ); DESCRIPTION sem_open() creates a new POSIX semaphore or opens an existing semaphore. I found this very useful for reviewing changes. Maybe you do too. :) Have a lovely day! Alex -- <https://www.alejandro-colomar.es/>
Attachment:
signature.asc
Description: PGP signature