comparison config.c @ 799:0b692b5d154b

Merge
author Michael Pavone <pavone@retrodev.com>
date Sun, 26 Jul 2015 13:25:31 -0700
parents 41f73c76b978 724bbec47f86
children 7ed55a361e79
comparison
equal deleted inserted replaced
798:062a2199daf6 799:0b692b5d154b
57 } 57 }
58 if (curline[0] == '}') { 58 if (curline[0] == '}') {
59 if (started) { 59 if (started) {
60 return head; 60 return head;
61 } 61 }
62 fprintf(stderr, "unexpected } on line %d\n", *line); 62 fatal_error("unexpected } on line %d\n", *line);
63 exit(1);
64 } 63 }
65 64
66 char * end = curline + len - 1; 65 char * end = curline + len - 1;
67 if (*end == '{') { 66 if (*end == '{') {
68 *end = 0; 67 *end = 0;
139 success: 138 success:
140 if (ret) { 139 if (ret) {
141 return ret; 140 return ret;
142 } 141 }
143 no_config: 142 no_config:
144 fputs("Failed to find a config file in ~/.config/blastem/blastem.cfg or in the blastem executable directory\n", stderr); 143 fatal_error("Failed to find a config file in ~/.config/blastem/blastem.cfg or in the blastem executable directory\n");
145 exit(1); 144 //this will never get reached, but the compiler doesn't know that. Let's make it happy
145 return NULL;
146 } 146 }
147 147