Remove unneeded semicolons from the core library

This commit is contained in:
gingerBill
2021-08-31 22:21:13 +01:00
parent b176af2742
commit 251da264ed
187 changed files with 27227 additions and 27227 deletions
+28 -28
View File
@@ -28,62 +28,62 @@ TEST: []u8 = {
0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x00, 0x2b, 0x48,
0xac, 0xcc, 0xc9, 0x4f, 0x4c, 0x01, 0x00, 0x15,
0x6a, 0x2c, 0x42, 0x07, 0x00, 0x00, 0x00,
};
}
main :: proc() {
// Set up output buffer.
buf := bytes.Buffer{};
buf := bytes.Buffer{}
stdout :: proc(s: string) {
os.write_string(os.stdout, s);
os.write_string(os.stdout, s)
}
stderr :: proc(s: string) {
os.write_string(os.stderr, s);
os.write_string(os.stderr, s)
}
args := os.args;
args := os.args
if len(args) < 2 {
stderr("No input file specified.\n");
err := load(slice=TEST, buf=&buf, known_gzip_size=len(TEST));
stderr("No input file specified.\n")
err := load(slice=TEST, buf=&buf, known_gzip_size=len(TEST))
if err == nil {
stdout("Displaying test vector: ");
stdout(bytes.buffer_to_string(&buf));
stdout("\n");
stdout("Displaying test vector: ")
stdout(bytes.buffer_to_string(&buf))
stdout("\n")
} else {
fmt.printf("gzip.load returned %v\n", err);
fmt.printf("gzip.load returned %v\n", err)
}
bytes.buffer_destroy(&buf);
os.exit(0);
bytes.buffer_destroy(&buf)
os.exit(0)
}
// The rest are all files.
args = args[1:];
err: Error;
args = args[1:]
err: Error
for file in args {
if file == "-" {
// Read from stdin
s := os.stream_from_handle(os.stdin);
s := os.stream_from_handle(os.stdin)
ctx := &compress.Context_Stream_Input{
input = s,
};
err = load(ctx, &buf);
}
err = load(ctx, &buf)
} else {
err = load(file, &buf);
err = load(file, &buf)
}
if err != nil {
if err != E_General.File_Not_Found {
stderr("File not found: ");
stderr(file);
stderr("\n");
os.exit(1);
stderr("File not found: ")
stderr(file)
stderr("\n")
os.exit(1)
}
stderr("GZIP returned an error.\n");
bytes.buffer_destroy(&buf);
os.exit(2);
stderr("GZIP returned an error.\n")
bytes.buffer_destroy(&buf)
os.exit(2)
}
stdout(bytes.buffer_to_string(&buf));
stdout(bytes.buffer_to_string(&buf))
}
bytes.buffer_destroy(&buf);
bytes.buffer_destroy(&buf)
}