changeset 25865:b1316c443f87

Add multiple inclusion guards to generated header file.
author diego
date Sun, 27 Jan 2008 18:42:00 +0000
parents ae6c30322f95
children 178006e9ea75
files TOOLS/alaw-gen.c
diffstat 1 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/TOOLS/alaw-gen.c	Sun Jan 27 18:40:01 2008 +0000
+++ b/TOOLS/alaw-gen.c	Sun Jan 27 18:42:00 2008 +0000
@@ -13,7 +13,10 @@
 
 system("sox -t raw -A -r 8000 -b alaw.dat -t sw alaw.out");
 
-printf("// Generated by TOOLS/alaw-gen.c\n");
+printf("// Generated by TOOLS/alaw-gen.c\n\n");
+
+printf("#ifndef ALAW_H\n");
+printf("#define ALAW_H\n");
 
 printf("\nconst short alaw2short[]={\n");
 
@@ -41,7 +44,9 @@
   if((i&7)==7) printf("\n");
 }
 fclose(f);
-printf("};\n");
+printf("};\n\n");
+
+printf("#endif /* ALAW_H */\n");
 
 return 0;
 }