diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
commit | e0c6872cf40896c7be36b11dcc744620f10adf1d (patch) | |
tree | 60335e10d2f4354b0674ec22d7b53f0f8abee672 /dviware/quicspool/libprofile/space.c |
Initial commit
Diffstat (limited to 'dviware/quicspool/libprofile/space.c')
-rw-r--r-- | dviware/quicspool/libprofile/space.c | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/dviware/quicspool/libprofile/space.c b/dviware/quicspool/libprofile/space.c new file mode 100644 index 0000000000..8bca164ae2 --- /dev/null +++ b/dviware/quicspool/libprofile/space.c @@ -0,0 +1,60 @@ +static char *rcs = "$Header: space.c,v 1.1 88/01/15 12:17:10 simpson Rel $"; +/* +$Log: space.c,v $ + * Revision 1.1 88/01/15 12:17:10 simpson + * initial release + * + * Revision 0.1 87/12/11 17:02:15 simpson + * beta test + * +*/ +#include "profile.h" + +extern char *calloc(); + +PROFILE_STANZA *profile_stanza_space () +{ + return((PROFILE_STANZA *)calloc(1, sizeof(PROFILE_STANZA))); +} + +PROFILE_MARKER *profile_marker_space (n) +int n; +{ + char *space; + PROFILE_MARKER *m = (PROFILE_MARKER *)0; + + if (space = calloc(1, sizeof(PROFILE_MARKER) + n + 1)) { + m = (PROFILE_MARKER *)space; + m->text = space + sizeof(PROFILE_MARKER); + } + return(m); +} + +PROFILE_BINDING *profile_binding_space (n) +int n; /* length of binding name in characters */ +{ + char *space; + PROFILE_BINDING *b = (PROFILE_BINDING *)0; + + if (space = calloc(1, sizeof(PROFILE_BINDING) + n + 1)) { + b = (PROFILE_BINDING *)space; + b->name = space + sizeof(PROFILE_BINDING); + } + return(b); +} + +PROFILE_VALUE *profile_value_space (n) +int n; +{ + char *space; + PROFILE_VALUE *v = (PROFILE_VALUE *)0; + + if (n > 0) { + if (space = calloc(1, sizeof(PROFILE_VALUE) + n + 1)) { + v = (PROFILE_VALUE *)space; + v->value.s = space + sizeof(PROFILE_VALUE); + } + } else + v = (PROFILE_VALUE *)calloc(1, sizeof(PROFILE_VALUE)); + return(v); +} |