Created
September 14, 2017 08:51
-
-
Save croepha/37dbf17b42692dfd8156476af537b1fb to your computer and use it in GitHub Desktop.
crap_gotos.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
char c; | |
#define _E(m_l) { printf("get_search_result_file_and_line failed at %d\n", __LINE__); goto m_l; } ; | |
c = read_char(); | |
if(c == '\n') _E(line_ended); | |
if(c != 'L') _E(ignore_rest); | |
c = read_char(); | |
if(c == '\n') _E(line_ended); | |
if(c != 'i') _E(ignore_rest); | |
c = read_char(); | |
if(c == '\n') _E(line_ended); | |
if(c != 'n') _E(ignore_rest); | |
c = read_char(); | |
if(c == '\n') _E(line_ended); | |
if(c != 'e') _E(ignore_rest); | |
c = read_char(); | |
if(c == '\n') _E(line_ended); | |
if(c != ' ') _E(ignore_rest); | |
result->line_number = __read_base0_to_u16(this, &c); | |
if(c == '\n') _E(line_ended); | |
if(c != ' ') _E(ignore_rest); | |
c = read_char(); | |
if(c == '\n') _E(line_ended); | |
if(c != 'o') _E(ignore_rest); | |
c = read_char(); | |
if(c == '\n') _E(line_ended); | |
if(c != 'f') _E(ignore_rest); | |
c = read_char(); | |
if(c == '\n') _E(line_ended); | |
if(c != ' ') _E(ignore_rest); | |
c = read_char(); | |
if(c == '\n') _E(line_ended); | |
if(c != '\\') _E(ignore_rest); | |
c = read_char(); | |
if(c == '\n') _E(line_ended); | |
if(c != '"') _E(ignore_rest); | |
result->file_name = copy_until(memory, "\\"); | |
ignore_rest: | |
ignore_rest_of_line(); | |
line_ended:; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment