MCPcopy Create free account
hub / github.com/boostorg/filesystem / cpp_main

Function cpp_main

doc/path_table.cpp:195–260  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

193#include <boost/test/included/prg_exec_monitor.hpp>
194
195int cpp_main( int argc, char * argv[] ) // note name!
196{
197 if ( argc != 5 )
198 {
199 std::cerr <<
200 "Usage: path_table \"POSIX\"|\"Windows\" input-file posix-file output-file\n"
201 "Run on POSIX first, then on Windows\n"
202 " \"POSIX\" causes POSIX results to be saved in posix-file;\n"
203 " \"Windows\" causes POSIX results read from posix-file\n"
204 " input-file contains the paths to appear in the table.\n"
205 " posix-file will be used for POSIX results\n"
206 " output-file will contain the generated HTML.\n"
207 ;
208 return 1;
209 }
210
211 infile.open( argv[2] );
212 if ( !infile )
213 {
214 std::cerr << "Could not open input file: " << argv[2] << std::endl;
215 return 1;
216 }
217
218 if (string(argv[1]) == "POSIX")
219 {
220 posix = true;
221 posix_outfile.open( argv[3] );
222 if ( !posix_outfile )
223 {
224 std::cerr << "Could not open POSIX output file: " << argv[3] << std::endl;
225 return 1;
226 }
227 }
228 else
229 {
230 posix = false;
231 posix_infile.open( argv[3] );
232 if ( !posix_infile )
233 {
234 std::cerr << "Could not open POSIX input file: " << argv[3] << std::endl;
235 return 1;
236 }
237 }
238
239 outfile.open( argv[4] );
240 if ( !outfile )
241 {
242 std::cerr << "Could not open output file: " << argv[2] << std::endl;
243 return 1;
244 }
245
246 outfile << "<html>\n"
247 "<head>\n"
248 "<title>Path Decomposition Table</title>\n"
249 "</head>\n"
250 "<body bgcolor=\"#ffffff\" text=\"#000000\">\n"
251 ;
252

Callers

nothing calls this directly

Calls 3

do_tableFunction · 0.85
stringFunction · 0.50
openMethod · 0.45

Tested by

no test coverage detected