X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Frasterize;a=blobdiff_plain;f=common.h;h=537e135908d281d05af84a5c9da9337127615a00;hp=dd6f034bc9171fa9dd67e5d73d52e0ef7550de13;hb=143da66e7f625b7f195a115b9740a748ee003534;hpb=b0a8ea303e942930350bf85c860afc969442c7a4 diff --git a/common.h b/common.h index dd6f034..537e135 100644 --- a/common.h +++ b/common.h @@ -15,6 +15,8 @@ #include #include +#include "config.h" + /* * Define a keyword for use while defining small and fast functions. @@ -132,11 +134,16 @@ int imax(int a, int b) * an error condition and an abort(3) occurs. * return. */ +#if VERBOSITY >= 1 #define TRY_DO(L, K, ARGS...) \ printf("* " L "... ", ##ARGS); \ fflush(stdout); \ if ((K) == 0) printf("done!\n"); \ else abort() +#else +#define TRY_DO(L, K, ARGS...) \ +if ((K) != 0) abort() +#endif /* @@ -239,10 +246,11 @@ void ltrim(char *str); * Trim white space off of both sides of a string. */ INLINE_MAYBE -void trim(char *str) +char* trim(char *str) { rtrim(str); ltrim(str); + return str; }