|
Revision 214, 1.3 kB
(checked in by athomas, 5 years ago)
|
Branched version 1.25.
|
| Line | |
|---|
| 1 |
/* +-------------------------------------------------------------------+ */ |
|---|
| 2 |
/* | Copyright 1991, David Koblas. | */ |
|---|
| 3 |
/* | Permission to use, copy, modify, and distribute this software | */ |
|---|
| 4 |
/* | and its documentation for any purpose and without fee is hereby | */ |
|---|
| 5 |
/* | granted, provided that the above copyright notice appear in all | */ |
|---|
| 6 |
/* | copies and that both that copyright notice and this permission | */ |
|---|
| 7 |
/* | notice appear in supporting documentation. This software is | */ |
|---|
| 8 |
/* | provided "as is" without express or implied warranty. | */ |
|---|
| 9 |
/* +-------------------------------------------------------------------+ */ |
|---|
| 10 |
|
|---|
| 11 |
#include <unistd.h> |
|---|
| 12 |
#include <limits.h> |
|---|
| 13 |
|
|---|
| 14 |
typedef struct cmd_s { |
|---|
| 15 |
char *name; |
|---|
| 16 |
int nargs, nopts; |
|---|
| 17 |
int margs, mopts; |
|---|
| 18 |
char **args, **opts; |
|---|
| 19 |
struct cmd_s *next; |
|---|
| 20 |
} cmd_t; |
|---|
| 21 |
|
|---|
| 22 |
typedef struct var_s { |
|---|
| 23 |
char *name, *value; |
|---|
| 24 |
struct var_s *next; |
|---|
| 25 |
} var_t; |
|---|
| 26 |
|
|---|
| 27 |
extern cmd_t *First, *Build(); |
|---|
| 28 |
extern var_t *Variables; |
|---|
| 29 |
|
|---|
| 30 |
void fatal(int logit, const char *format, ...); |
|---|
| 31 |
int logger(unsigned flags, const char *format, ...); |
|---|
| 32 |
|
|---|
| 33 |
int ReadFile(char *file); |
|---|
| 34 |
int CountArgs(cmd_t *cmd); |
|---|
| 35 |
int atov(char *str, int type); |
|---|
| 36 |
|
|---|
| 37 |
#define MAXSTRLEN 2048 |
|---|
| 38 |
#define OP_ACCESS "/etc/op.conf" |
|---|
| 39 |
#define VERSION "1.25" |
|---|
| 40 |
|
|---|
| 41 |
#define VAR_EXPAND_LEN 8192 |
|---|
| 42 |
#define VAR_NAME_LEN 64 |
|---|
| 43 |
|
|---|
| 44 |
#ifndef HOST_NAME_MAX |
|---|
| 45 |
#define HOST_NAME_MAX 255 |
|---|
| 46 |
#endif |
|---|