Skip to content


typeof is GNU extension, don't use it
Browse files Browse the repository at this point in the history
  • Loading branch information
AMDmi3 committed Mar 12, 2015
1 parent 2ba2af0 commit 388e056
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bits.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#define min(a,b) ((a)<(b)?(a):(b))
#define max(a,b) ((a)>(b)?(a):(b))
#define clamp(v,a,b) ((v)=((v)<(a))?(a):(((v)<(b))?(v):(b)))
#define transfer(v,f,t) do { typeof(f) tmp=min(v, f); f-=tmp; t+=tmp;} while(0)
#define transfer(v,f,t) do { t+=min(v,f); f-=min(v,f); } while(0)

char *fgetl(FILE *); // gets a line of string data; returns a malloc-like pointer
char *slurp(FILE *); // gets a file of string data; returns a malloc-like pointer
Expand Down

0 comments on commit 388e056

Please sign in to comment.