]> cygwin.com Git - cygwin-apps/setup.git/blob - inilintmain.cc
33239fb34f98618714436afbab20161989636cdb
[cygwin-apps/setup.git] / inilintmain.cc
1 /*
2 * Copyright (c) 2002, Robert Collins.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * A copy of the GNU General Public License can be found at
10 * http://www.gnu.org/
11 *
12 * Written by Robert Collins <rbtcollins@hotmail.com>
13 *
14 */
15
16 #include "getopt++/GetOption.h"
17 #include <iostream>
18 #include <sstream>
19
20 extern int yylineno;
21
22 static std::ostringstream error_buf;
23 static int error_count = 0;
24
25 extern int
26 yyerror (const std::string& s)
27 {
28 std::ostringstream buf;
29 buf << "setup.ini line " << yylineno << ": ";
30 buf << s << endl;
31 cout << buf;
32 error_buf << buf;
33 error_count++;
34 /* TODO: is return 0 correct? */
35 return 0;
36 }
37
38 void
39 show_help()
40 {
41 cout << "inilint checks cygwin setup.ini files and reports any errors with" << endl;
42 cout << "diagnostics" << endl;
43 }
44
45 int
46 main (int argc, char **argv)
47 {
48 if (!GetOption::GetInstance().Process (argc,argv,NULL))
49 {
50 show_help();
51 return 1;
52 }
53 return 0;
54 }
This page took 0.036483 seconds and 4 git commands to generate.