Imported Debian patch 0.1beta-15
[debian/yforth] / division.c
index 2a404985bde03a7a87eb049a1b9dd8cb0e538e77..3e7e9165a8c374f24dd3432ca06681f983590759 100644 (file)
@@ -1,2 +1,11 @@
 #include <stdio.h>
-main() { printf("#define FLOORED_DIVISION %d\n", (-10 % 7) > 0 ? 1 : 0); }
+#include <math.h>
+#include <assert.h>
+
+main() {
+       FILE *f = fopen("div.h", "wt");
+       assert(f != NULL);
+       fprintf(f, "#define FLOORED_DIVISION %d\n", (-10 % 7) > 0 ? 1 : 0);
+       fclose(f);
+       return 0;
+}