2 * Copyright (c) 2002, Robert Collins.
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.
9 * A copy of the GNU General Public License can be found at
12 * Written by Robert Collins <rbtcollins@hotmail.com>
16 #include "io_stream.h"
17 #include "IniDBBuilderLint.h"
18 #include "CliParseFeedback.h"
22 #include "LogSingleton.h"
27 std::cout
<< "inilint checks cygwin setup.ini files and reports any errors" << std::endl
;
31 main (int argc
, char **argv
)
39 std::string inifilename
= argv
[1];
41 // Note: this only accepts absolute pathnames
42 io_stream
*ini_file
= io_stream::open ("file://" + inifilename
, "rb", 0);
45 std::cerr
<< "could not open " << inifilename
<< std::endl
;
49 CliParseFeedback feedback
;
50 IniDBBuilderLint builder
;
51 ini_init(ini_file
, &builder
, feedback
);
53 // Note: unrecognized lines are ignored by ignore_line(), so this is currently
54 // only useful for finding where recognized lines don't fit the grammar.
63 static std::string empty
;