diff options
author | ewt <devnull@localhost> | 1998-01-12 21:31:29 +0000 |
---|---|---|
committer | ewt <devnull@localhost> | 1998-01-12 21:31:29 +0000 |
commit | 757e50ffc827297e36f793cf79ddc471878f6d0b (patch) | |
tree | dc29d9ef04a9462998bdfaaa3ee7054585fe01c8 /build/misc.h | |
parent | ec07f9df959c911c60727ba68c455f4ff20497bf (diff) | |
download | rpm-757e50ffc827297e36f793cf79ddc471878f6d0b.tar.gz rpm-757e50ffc827297e36f793cf79ddc471878f6d0b.tar.bz2 rpm-757e50ffc827297e36f793cf79ddc471878f6d0b.zip |
merged in Marc's new build code
CVS patchset: 1956
CVS date: 1998/01/12 21:31:29
Diffstat (limited to 'build/misc.h')
-rw-r--r-- | build/misc.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/build/misc.h b/build/misc.h new file mode 100644 index 000000000..1ac941509 --- /dev/null +++ b/build/misc.h @@ -0,0 +1,27 @@ +#ifndef _MISC_H_ +#define _MISC_H_ + +#include "spec.h" +#include "ctype.h" + +#define FREE(x) { if (x) free(x); x = NULL; } + +#define SKIPSPACE(s) { while (*(s) && isspace(*(s))) (s)++; } + +#define SKIPNONSPACE(s) { while (*(s) && !isspace(*(s))) (s)++; } + +#define SKIPTONEWLINE(s) { while (*s && *s != '\n') s++; } + +#define PART_SUBNAME 0 +#define PART_NAME 1 + +void addOrAppendListEntry(Header h, int_32 tag, char *line); +int parseSimplePart(char *line, char **name, int *flag); +char *findLastChar(char *s); +int parseYesNo(char *s); +int parseNum(char *line, int *res); +StringBuf getOutputFrom(char *dir, char *argv[], + char *writePtr, int writeBytesLeft, + int failNonZero); + +#endif |