dj(1): revert changes to function return type formatting

This commit is contained in:
Emma Tebibyte 2024-07-15 13:09:09 -06:00
parent 71e98dbde7
commit c2e6744e2b
Signed by: emma
GPG Key ID: 06FA419A1698C270

View File

@ -66,7 +66,8 @@ static int write_flags = O_WRONLY | O_CREAT;
/* Macro to check if fd is stdin or stdout */ /* Macro to check if fd is stdin or stdout */
#define fdisstd(fd) ((fd) == STDIN_FILENO || (fd) == STDOUT_FILENO) #define fdisstd(fd) ((fd) == STDIN_FILENO || (fd) == STDOUT_FILENO)
static struct Io * Io_read(struct Io *io) { static struct Io *
Io_read(struct Io *io) {
int t; int t;
assert(io->bs > 0); assert(io->bs > 0);
@ -87,7 +88,8 @@ static struct Io * Io_read(struct Io *io) {
return io; return io;
} }
static struct Io * Io_write(struct Io *io) { static struct Io *
Io_write(struct Io *io) {
int t; int t;
assert(io->bufuse > 0); assert(io->bufuse > 0);
@ -107,14 +109,16 @@ static struct Io * Io_write(struct Io *io) {
return io; return io;
} }
static int oserr(char *e, int n) { static int
oserr(char *e, int n) {
fprintf(stderr, "%s: %s: %s\n", program_name, e, strerror(n)); fprintf(stderr, "%s: %s: %s\n", program_name, e, strerror(n));
return EX_OSERR; return EX_OSERR;
} }
/* Prints statistics regarding the use of dj, particularly partially and /* Prints statistics regarding the use of dj, particularly partially and
* completely read and written records. */ * completely read and written records. */
static void fprintio(FILE *stream, char *fmt, struct Io io[2]) { static void
fprintio(FILE *stream, char *fmt, struct Io io[2]) {
fprintf( fprintf(
stream, stream,
fmt, fmt,
@ -132,7 +136,8 @@ static void fprintio(FILE *stream, char *fmt, struct Io io[2]) {
/* Parses the string s to an integer, returning either the integer or in the /* Parses the string s to an integer, returning either the integer or in the
* case of an error a negative integer. This is used for argument parsing * case of an error a negative integer. This is used for argument parsing
* (e.g. -B [int]) in dj and no negative integer would be valid anyway. */ * (e.g. -B [int]) in dj and no negative integer would be valid anyway. */
static long parse(char *s){ static long
parse(char *s) {
long r; long r;
errno = 0; errno = 0;
@ -140,7 +145,8 @@ static long parse(char *s){
return (*s == '\0' && errno == 0) ? r : -1; /* no chars left unparsed */ return (*s == '\0' && errno == 0) ? r : -1; /* no chars left unparsed */
} }
static int usage(char *s){ static int
usage(char *s) {
fprintf( fprintf(
stderr, "Usage: %s [-Hn] [-a byte] [-c count]\n" stderr, "Usage: %s [-Hn] [-a byte] [-c count]\n"
"\t[-i file] [-b block_size] [-s offset]\n" "\t[-i file] [-b block_size] [-s offset]\n"