void task_cleanup(const char *curdir) {
DIR *dir;
struct dirent *files;
- struct stat directory;
char buffer[4096];
dir = opendir(curdir);
while ((files = readdir(dir))) {
memset(buffer, 0, sizeof(buffer));
- stat(files->d_name, &directory);
-
if (strstr(files->d_name, "TMP")) {
snprintf(buffer, sizeof(buffer), "%s/%s", curdir, files->d_name);
if (remove(buffer))
--- /dev/null
+void(string, string) print = #1;
+entity() spawn = #3;
+
+.string a;
+.string b;
+
+void(entity e, .string s) callout = {
+ print(e.s, "\n");
+};
+
+void() main = {
+ local entity e;
+ e = spawn();
+ e.a = "foo";
+ e.b = "bar";
+ callout(e, b);
+};
--- /dev/null
+I: fieldparams.qc
+D: test field paramaters
+T: -execute
+C: -std=qcc
+E: $null
+F: field paramaters fail
+S: field paramaters work
+M: bar
+++ /dev/null
-void(string, string) print = #1;
-entity() spawn = #3;
-
-.string a;
-.string b;
-
-void(entity e, .string s) callout = {
- print(e.s, "\n");
-};
-
-void() main = {
- local entity e;
- e = spawn();
- e.a = "foo";
- e.b = "bar";
- callout(e, b);
-};
+++ /dev/null
-I: fieldparams.qc
-D: test field paramaters
-T: -execute
-C: -std=qcc
-E: $null
-F: field paramaters fail
-S: field paramaters work
-M: bar
--- /dev/null
+void(string, string) print = #1;
+
+string() getter = {
+ return "correct";
+};
+
+void(string() f) printer = {
+ print(f(), "\n");
+};
+
+void() main = {
+ printer(getter);
+};
--- /dev/null
+I: functions-as-params.qc
+D: test functions as paramaters
+T: -execute
+C: -std=gmqcc
+E: $null
+F: functions as paramaters failed
+S: functions as paramaters passed
+M: correct
--- /dev/null
+void(string, ...) print = #1;
+
+void(float c) main = {
+ if (c == 1)
+ print("One\n");
+ else if (c == 2)
+ print("Two\n");
+ else if (c == 3)
+ print("Three\n");
+ else
+ print("Else\n");
+};
--- /dev/null
+I: ifs.qc
+D: test if statement
+T: -execute
+C: -std=gmqcc
+E: -float 2
+F: if statement failed
+S: if statement passed
+M: Two
--- /dev/null
+void(...) print = %:1;
+
+void() main = ??<
+ print("??=??'??(??)??!??<??>??-??/??/%>|");
+ print("#^[]|{}~\\%>\n");
+%>;
--- /dev/null
+I: ngraphs.qc
+D: test digraphs and trigraphs
+T: -execute
+C: -std=gmqcc
+E: $null
+F: digraphs and trigraphs failed
+S: digraphs and trigraphs passed
+M: #^[]|{}~\%>|#^[]|{}~\%>