File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -114,18 +114,18 @@ int main(int argc, char **argv)
114114 }
115115 } else if (filename) {
116116 std::cout << " error: multiple filenames specified" << std::endl;
117- std::exit ( 1 ) ;
117+ return 1 ;
118118 } else {
119119 filename = arg;
120120 }
121121 }
122122
123123 if (error)
124- std::exit ( 1 ) ;
124+ return 1 ;
125125
126126 if (quiet && error_only) {
127127 std::cout << " error: -e cannot be used in conjunction with -q" << std::endl;
128- std::exit ( 1 ) ;
128+ return 1 ;
129129 }
130130
131131 if (!filename) {
@@ -141,7 +141,7 @@ int main(int argc, char **argv)
141141 std::cout << " -e Output errors only." << std::endl;
142142 std::cout << " -f Fail when errors were encountered (exitcode 1)." << std::endl;
143143 std::cout << " -l Print lines numbers." << std::endl;
144- std::exit ( 0 ) ;
144+ return 0 ;
145145 }
146146
147147 dui.removeComments = true ;
@@ -154,7 +154,7 @@ int main(int argc, char **argv)
154154 std::ifstream f (filename);
155155 if (!f.is_open ()) {
156156 std::cout << " error: could not open file '" << filename << " '" << std::endl;
157- std::exit ( 1 ) ;
157+ return 1 ;
158158 }
159159 rawtokens = new simplecpp::TokenList (f, files,filename,&outputList);
160160 } else {
You can’t perform that action at this time.
0 commit comments