mirror of
https://github.com/pragma-/pbot.git
synced 2025-01-23 02:24:25 +01:00
c2english: add uchar.h and update error message to C11
This commit is contained in:
parent
3f6f3b6a36
commit
b0f12edc9b
@ -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";
|
||||
|
Loading…
Reference in New Issue
Block a user