This commit is contained in:
seta75D
2021-10-11 19:38:01 -03:00
commit 7c4988eac0
12567 changed files with 3198619 additions and 0 deletions

45
cmd/osadmin/include/cmderr.h Executable file
View File

@@ -0,0 +1,45 @@
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
/* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T */
/* The copyright notice above does not evidence any */
/* actual or intended publication of such source code. */
#ident "@(#)cmderr.h 1.3 92/07/14 SMI" /* SVr4.0 1.1 */
/* Copyright (c) 1988 AT&T */
/* All Rights Reserved */
/* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T */
/* The copyright notice above does not evidence any */
/* actual or intended publication of such source code. */
/*
Include file for error message interface.
Command and library version.
*/
#define cmderr errtag( __FILE__, __LINE__ ), errtext
extern void erradvice();
extern void errafter(); /* routine run after text is printed */
extern void errbefore(); /* routine run before text is printed */
extern void errtag();
extern void errtext();
extern void errtofix();
extern void errverb();
extern int errexit; /* exit(2) code to use if error causes exit */
extern char **errmessage; /* error messages that depend on severity */
extern char *pgm_name;
/* severities */
#define CINFO 0
#define CWARN 1
#define CERROR 2
#define CHALT 3
/* special errtext() argument that prints a standard message based on errno */
#define CERRNO 1
/* list of additional arguments, after format, to errtext(), errbefore() and
errafter() */
#define ErrArgList a1, a2, a3, a4, a5, a6, a7, a8, a9, a10

101
cmd/osadmin/include/stddef.h Executable file
View File

@@ -0,0 +1,101 @@
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
/* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T */
/* The copyright notice above does not evidence any */
/* actual or intended publication of such source code. */
#ident "@(#)stddef.h 1.3 92/07/14 SMI" /* SVr4.0 1.1 */
/* Copyright (c) 1988 AT&T */
/* All Rights Reserved */
/* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T */
/* The copyright notice above does not evidence any */
/* actual or intended publication of such source code. */
/*
Standard defines for common usage.
*/
/* Used by argfopen
*/
#define IGNORE (-1)
#define ERROR (-2)
#define FATAL (-3)
/* Useful string comparison macros
*/
#define EQ(s1,s2) (!strcmp(s1, s2))
/* use !EQ for "not equal" */
#define EQN(s1,s2,n) (!strncmp(s1,s2,n))
#define LT(s1,s2) (strcmp(s1, s2) < 0)
#define LE(s1,s2) (strcmp(s1, s2) <= 0)
#define GT(s1,s2) (strcmp(s1, s2) > 0)
#define GE(s1,s2) (strcmp(s1, s2) >= 0)
/* verify that s1 contains only characters in s2
*/
#define VERIFY(s1,s2) (strlen(s1) == strspn(s1,s2))
#define BUMPARG (argc--, argv++) /* bump the arg count and arg vector */
#define DEBUG(x) fprintf(stderr, x)
#define ROUND(f) ((int)(f + .5)) /* integer rounded value of float */
/*
duplicate a string by allocating space and copying it in
*/
extern char *Malloc();
#define strdup(s) strcpy( Malloc( strlen(s)+1 ), s )
/*
Definitions of global variables, compiled into stddef.c
*/
#ifndef EXTERN
#define EXTERN extern
#endif
/*
for argfopen.c
*/
#ifndef stdin
#include <stdio.h>
#endif
extern FILE *argfopen();
EXTERN int argf_dir;
/*
for bufsplit.c
*/
extern unsigned bufsplit();
extern char *bsplitchar; /* initialized in bufsplit.c */
/*
for copylist.c
*/
extern char *copylist();
extern long clistcnt();
/*
for filename.c
*/
EXTERN char *file_name; /* currently open file name */
/*
for Fopen.c
*/
extern FILE *Fopen();
/*
for pgmname.c
*/
EXTERN char *pgm_name; /* current main program name */
#undef EXTERN

51
cmd/osadmin/include/switch.h Executable file
View File

@@ -0,0 +1,51 @@
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
/* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T */
/* The copyright notice above does not evidence any */
/* actual or intended publication of such source code. */
#ident "@(#)switch.h 1.3 92/07/14 SMI" /* SVr4.0 1.1 */
/* Copyright (c) 1988 AT&T */
/* All Rights Reserved */
/* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T */
/* The copyright notice above does not evidence any */
/* actual or intended publication of such source code. */
/*
defines for the SWITCH construct for selecting among character strings
*/
#define WoRD(x)x
#define SWITCH(a) { char *s_w_i_t_c_h; s_w_i_t_c_h = a; WoRD(/)WoRD(*)
#define CASE(a) } else WoRD(/)WoRD(*) WoRD(*)WoRD(/) \
if( !strcmp(s_w_i_t_c_h, a) ) {
#define CASE2(a1,a2) } else WoRD(/)WoRD(*) WoRD(*)WoRD(/)\
if( !strcmp(s_w_i_t_c_h, a1) ||\
!strcmp(s_w_i_t_c_h, a2) ) {
#define CASE3(a1,a2,a3) } else WoRD(/)WoRD(*) WoRD(*)WoRD(/)\
if( !strcmp(s_w_i_t_c_h, a1) ||\
!strcmp(s_w_i_t_c_h, a2) ||\
!strcmp(s_w_i_t_c_h, a3) ) {
#define CASEN(a) } else WoRD(/)WoRD(*) WoRD(*)WoRD(/)\
if( !strncmp(s_w_i_t_c_h, a, sizeof(a)-1) ) {
#define CASEN2(a1,a2) } else WoRD(/)WoRD(*) WoRD(*)WoRD(/)\
if( !strncmp(s_w_i_t_c_h, a1, sizeof(a1)-1) ||\
!strncmp(s_w_i_t_c_h, a2, sizeof(a2)-1) ) {
#define CASEN3(a1,a2,a3) } else WoRD(/)WoRD(*) WoRD(*)WoRD(/)\
if( !strncmp(s_w_i_t_c_h, a1, sizeof(a1)-1) ||\
!strncmp(s_w_i_t_c_h, a2, sizeof(a2)-1) ||\
!strncmp(s_w_i_t_c_h, a3, sizeof(a3)-1) ) {
#define DEFAULT } else WoRD(/)WoRD(*) WoRD(*)WoRD(/) {
#define ENDSW } WoRD(/)WoRD(*) WoRD(*)WoRD(/) }