Merge branch 'nosysexits'

This commit is contained in:
Emma Tebibyte 2023-12-25 19:04:44 -07:00
commit 74d5b65f78
Signed by: emma
GPG Key ID: 06FA419A1698C270
5 changed files with 15 additions and 8 deletions

View File

@ -18,9 +18,9 @@
#include <errno.h> /* errno */
#include <stdio.h> /* fprintf(3), stderr */
#include <stdlib.h> /* strtol(3), size_t */
#include <stdlib.h> /* strtol(3), size_t, EXIT_FAILURE */
#ifndef EX_USAGE
# include <sysexits.h> /* EX_USAGE */
# define EX_USAGE EXIT_FAILURE
#endif
#include <unistd.h> /* getopt(3), optind */

View File

@ -18,9 +18,13 @@
#include <stdio.h> /* fprintf(3), fputs(3), getc(3), putc(3), stdin, stdout,
* EOF */
#include <stdlib.h> /* EXIT_FAILURE, EXIT_SUCCESS */
#include <unistd.h> /* getopt(3) */
#if !defined EX_USAGE || !defined EX_OK
# include <sysexits.h>
#if !defined EX_USAGE
# define EX_USAGE EXIT_FAILURE
#endif
#if !defined EX_OK
# define EX_OK EXIT_SUCCESS
#endif
int main(int argc, char *argv[]){

View File

@ -17,9 +17,10 @@
*/
#include <stdio.h> /* fprintf(3), stderr, NULL */
#include <stdlib.h> /* EXIT_FAILURE */
#include <string.h> /* strchr(3) */
#ifndef EX_USAGE
# include <sysexits.h>
# define EX_USAGE EXIT_FAILURE
#endif
#include <unistd.h> /* access(3), getopt(3), F_OK, R_OK, W_OK, X_OK */
#include <sys/stat.h> /* lstat(3), stat struct, S_ISBLK, S_ISCHR, S_ISDIR,

View File

@ -20,9 +20,10 @@
#include <ctype.h>
#include <stddef.h> /* NULL */
#include <stdio.h> /* fprintf(3) */
#include <stdlib.h> /* EXIT_FAILURE */
#include <string.h> /* strcmp(3) */
#if !defined EX_USAGE
# include <sysexits.h>
# define EX_USAGE EXIT_FAILURE
#endif
static char *program_name = "str";

View File

@ -1,6 +1,7 @@
#include <stdio.h> /* fprintf(3), stderr */
#ifndef EX_USAGE
# include <sysexits.h> /* EX_USAGE */
#include <stdlib.h> /* EXIT_FAILURE */
#if !defined EX_USAGE
# define EX_USAGE EXIT_FAILURE
#endif
static char *program_name = "strcmp";