c2english: add uchar.h and update error message to C11

This commit is contained in:
Pragmatic Software 2015-09-08 01:23:44 -07:00
parent 3f6f3b6a36
commit b0f12edc9b
1 changed files with 2 additions and 2 deletions

View File

@ -25,7 +25,7 @@ if($code =~ s/^-f\s+//) {
}
my ($has_function, $has_main, $got_nomain);
my $prelude_base = "#define _XOPEN_SOURCE 9001\n#define __USE_XOPEN\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <unistd.h>\n#include <math.h>\n#include <limits.h>\n#include <sys/types.h>\n#include <stdint.h>\n#include <errno.h>\n#include <ctype.h>\n#include <assert.h>\n#include <stdnoreturn.h>\n#include <stdbool.h>\n#include <stdalign.h>\n#include <time.h>\n#include <stddef.h>\n#define _Atomic\n#define _Static_assert(a, b)\n\n";
my $prelude_base = "#define _XOPEN_SOURCE 9001\n#define __USE_XOPEN\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <unistd.h>\n#include <math.h>\n#include <limits.h>\n#include <sys/types.h>\n#include <stdint.h>\n#include <errno.h>\n#include <ctype.h>\n#include <assert.h>\n#include <stdnoreturn.h>\n#include <stdbool.h>\n#include <stdalign.h>\n#include <time.h>\n#include <stddef.h>\n#include <uchar.h>\n#define _Atomic\n#define _Static_assert(a, b)\n\n";
my $prelude = $prelude_base;
print "code before: [$code]\n" if $debug;
@ -414,7 +414,7 @@ if(not $has_function and not $has_main) {
$output =~ s/\s+/ /;
if(not $output) {
$output = "Does not compute; I only understand valid C89 code.\n";
$output = "Does not compute; I only understand valid C11 code.\n";
}
print "$output\n";