From: thib Date: Fri, 22 Jun 2001 21:08:43 +0000 (+0000) Subject: added Set macro X-Git-Tag: ver1564~237 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bf08c7032207aceb2e61c1433de7c91c80171f3c;p=fcron added Set macro Skip_blanks moved from fcrontab.h to global.h --- diff --git a/global.h b/global.h index c1e1332..6032823 100644 --- a/global.h +++ b/global.h @@ -21,7 +21,7 @@ * `LICENSE' that comes with the fcron source distribution. */ - /* $Id: global.h,v 1.29 2001-06-03 10:57:18 thib Exp $ */ + /* $Id: global.h,v 1.30 2001-06-22 21:08:43 thib Exp $ */ /* @@ -124,6 +124,15 @@ if( (ptr = calloc(1, sizeof(type))) == NULL ) \ die_e("Could not calloc."); +#define Set(var, value) \ + free(var); \ + var = strdup2(value); + +#define Skip_blanks(ptr) \ + while((*ptr == ' ') || (*ptr == '\t')) \ + ptr++; + + #define debug if(debug_opt) Debug typedef struct env_t {