LibOFX
ofx_preproc.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  ofx_preproc.cpp
3  -------------------
4  copyright : (C) 2002 by Benoit Gr�oir
5  email : benoitg@coeus.ca
6 ***************************************************************************/
12 /***************************************************************************
13  * *
14  * This program is free software; you can redistribute it and/or modify *
15  * it under the terms of the GNU General Public License as published by *
16  * the Free Software Foundation; either version 2 of the License, or *
17  * (at your option) any later version. *
18  * *
19  ***************************************************************************/
20 #include "../config.h"
21 #include <iostream>
22 #include <fstream>
23 #include <cstdlib>
24 #include <stdio.h>
25 #include <sstream>
26 #include <string>
27 #include "ParserEventGeneratorKit.h"
28 #include "libofx.h"
29 #include "messages.hh"
30 #include "ofx_sgml.hh"
31 #include "ofc_sgml.hh"
32 #include "ofx_preproc.hh"
33 #include "ofx_utilities.hh"
34 #ifdef HAVE_ICONV
35 #include <iconv.h>
36 #endif
37 
38 #ifdef _WIN32
39 # define DIRSEP "\\"
40 #else
41 # define DIRSEP "/"
42 #endif
43 
44 #ifdef _WIN32
45 # include "win32.hh"
46 # include <windows.h> // for GetModuleFileName()
47 # undef ERROR
48 # undef DELETE
49 #endif
50 
51 #define LIBOFX_DEFAULT_INPUT_ENCODING "CP1252"
52 #define LIBOFX_DEFAULT_OUTPUT_ENCODING "UTF-8"
53 
57 #ifdef MAKEFILE_DTD_PATH
58 const int DTD_SEARCH_PATH_NUM = 4;
59 #else
60 const int DTD_SEARCH_PATH_NUM = 3;
61 #endif
62 
67 {
68 #ifdef MAKEFILE_DTD_PATH
69  MAKEFILE_DTD_PATH,
70 #endif
71  "/usr/local/share/libofx/dtd",
72  "/usr/share/libofx/dtd",
73  "~"
74 };
75 
80 int ofx_proc_file(LibofxContextPtr ctx, const char * p_filename)
81 {
82  LibofxContext *libofx_context;
83  bool ofx_start = false;
84  bool ofx_end = false;
85  bool file_is_xml = false;
86  bool used_iconv = false;
87  std::ifstream input_file;
88  std::ofstream tmp_file;
89  char *filenames[3];
90  char tmp_filename[256];
91  int tmp_file_fd;
92 #ifdef HAVE_ICONV
93  iconv_t conversion_descriptor;
94 #endif
95  libofx_context = (LibofxContext*)ctx;
96 
97  if (p_filename != NULL && strcmp(p_filename, "") != 0)
98  {
99  message_out(DEBUG, std::string("ofx_proc_file():Opening file: ") + p_filename);
100 
101  input_file.open(p_filename);
102  if (!input_file)
103  {
104  message_out(ERROR, "ofx_proc_file():Unable to open the input file " + std::string(p_filename));
105  }
106 
107  mkTempFileName("libofxtmpXXXXXX", tmp_filename, sizeof(tmp_filename));
108 
109  message_out(DEBUG, "ofx_proc_file(): Creating temp file: " + std::string(tmp_filename));
110 #ifdef _WIN32
111  tmp_file_fd = mkstemp_win32(tmp_filename);
112 #else
113  tmp_file_fd = mkstemp(tmp_filename);
114 #endif
115  if (tmp_file_fd)
116  {
117  tmp_file.open(tmp_filename);
118  if (!tmp_file)
119  {
120  message_out(ERROR, "ofx_proc_file():Unable to open the created temp file " + std::string(tmp_filename));
121  return -1;
122  }
123  }
124  else
125  {
126  message_out(ERROR, "ofx_proc_file():Unable to create a temp file at " + std::string(tmp_filename));
127  return -1;
128  }
129 
130  if (input_file && tmp_file)
131  {
132  std::size_t header_separator_idx;
133  std::string header_name;
134  std::string header_value;
135  std::string ofx_encoding;
136  std::string ofx_charset;
137  do
138  {
139  std::stringbuf buffer;
140  std::string s_buffer;
141  input_file.get(buffer, '\n');
142  //cout<< "got: \"" << buffer<<"\"\n";
143  s_buffer = buffer.str();
144 
145  // Watch out: If input_file is in eof(), any subsequent read or
146  // peek() will fail and we must exit this loop.
147  if (!input_file.eof())
148  {
149  //cout<<"input_file.gcount(): "<<input_file.gcount()<< " s_buffer.size=" << s_buffer.size()<<" sizeof(buffer): "<<sizeof(buffer) << " peek=\"" << int(input_file.peek()) << "\"" <<endl;
150  if (input_file.fail()) // If no characters were extracted above, the failbit is set.
151  {
152  // No characters extracted means that we've reached the newline
153  // delimiter (because we already checked for EOF). We will check
154  // for and remove that newline in the next if-clause, but must
155  // remove the failbit so that peek() will work again.
156  input_file.clear();
157  }
158 
159  // Is the next character really the newline?
160  if (input_file.peek() == '\n')
161  {
162  // Yes. Then discard that newline character from the stream
163  input_file.get();
164  }
165  }
166 
167  if (ofx_start == false && (s_buffer.find("<?xml") != std::string::npos))
168  {
169  message_out(DEBUG, "ofx_proc_file(): File is an actual XML file, iconv conversion will be skipped.");
170  file_is_xml = true;
171  }
172 
173  std::size_t ofx_start_idx;
174  if (ofx_start == false)
175  {
176  if (
177  (libofx_context->currentFileType() == OFX &&
178  ((ofx_start_idx = s_buffer.find("<OFX>")) != std::string::npos ||
179  (ofx_start_idx = s_buffer.find("<ofx>")) != std::string::npos))
180  ||
181  (libofx_context->currentFileType() == OFC &&
182  ((ofx_start_idx = s_buffer.find("<OFC>")) != std::string::npos ||
183  (ofx_start_idx = s_buffer.find("<ofc>")) != std::string::npos))
184  )
185  {
186  ofx_start = true;
187  if (file_is_xml == false)
188  {
189  s_buffer.erase(0, ofx_start_idx); //Fix for really broken files that don't have a newline after the header.
190  }
191  message_out(DEBUG, "ofx_proc_file():<OFX> or <OFC> has been found");
192 
193  static char sp_charset_fixed[] = "SP_CHARSET_FIXED=1";
194  if (putenv(sp_charset_fixed) != 0)
195  {
196  message_out(ERROR, "ofx_proc_file(): putenv failed");
197  }
198 #define OPENSP_UTF8_WARNING_TEXT "ofx_proc_file(): OpenSP cannot process an UTF-8 XML file without garbling it. Furthermore, on windows the support for UTF-8 encode SGML files is broken. This is worked around by forcing a single byte encoding. If the file is indeed UTF-8, it should pass through unmolested, but you will likely get 'non SGML character number' errors, even though the output is correct."
199  if (file_is_xml == true)
200  {
201  /* Normally the following would be "SP_ENCODING=xml".
202  * Unfortunately, opensp's generic api will garble UTF-8 if this
203  * is set to xml. So we set a single byte encoding that uses most
204  * values to avoid messing up the UTF-8.
205  * Unfortunately this means that non-UTF-8 files will not
206  * get properly translated. We'd need to manually detect the
207  * encoding in the XML header and convert the xml with iconv like
208  * we do for SGML to work around the problem. Most unfortunate. */
209  message_out(WARNING, OPENSP_UTF8_WARNING_TEXT);
210  static char sp_encoding[] = "SP_ENCODING=ms-dos";
211  if (putenv(sp_encoding) != 0)
212  {
213  message_out(ERROR, "ofx_proc_file(): putenv failed");
214  }
215  }
216  else
217  {
218  static char sp_encoding[] = "SP_ENCODING=ms-dos"; // Like the above, force a single byte encoding in every case, we don't want opensp messing up UTF-8
219  if (putenv(sp_encoding) != 0)
220  {
221  message_out(ERROR, "ofx_proc_file(): putenv failed");
222  }
223 #ifdef HAVE_ICONV
224  std::string fromcode;
225  std::string tocode;
226  if (ofx_encoding.compare("USASCII") == 0)
227  {
228  if (ofx_charset.compare("ISO-8859-1") == 0 || ofx_charset.compare("8859-1") == 0)
229  {
230  //Only "ISO-8859-1" is actually a legal value, but since the banks follows the spec SO well...
231  fromcode = "ISO-8859-1";
232  }
233  else if (ofx_charset.compare("1252") == 0 || ofx_charset.compare("CP1252") == 0)
234  {
235  //Only "1252" is actually a legal value, but since the banks follows the spec SO well...
236  fromcode = "CP1252";
237  }
238  else if (ofx_charset.compare("NONE") == 0)
239  {
240  fromcode = LIBOFX_DEFAULT_INPUT_ENCODING;
241  }
242  else
243  {
244  fromcode = LIBOFX_DEFAULT_INPUT_ENCODING;
245  }
246  }
247  else if (ofx_encoding.compare("UTF-8") == 0 || ofx_encoding.compare("UNICODE") == 0)
248  {
249  //While "UNICODE" isn't a legal value, some cyrilic files do specify it as such...
250  fromcode = "UTF-8";
251  message_out(WARNING, OPENSP_UTF8_WARNING_TEXT);
252  }
253  else
254  {
255  fromcode = LIBOFX_DEFAULT_INPUT_ENCODING;
256  }
257  tocode = LIBOFX_DEFAULT_OUTPUT_ENCODING;
258  message_out(DEBUG, "ofx_proc_file(): Setting up iconv for fromcode: " + fromcode + ", tocode: " + tocode);
259  conversion_descriptor = iconv_open (tocode.c_str(), fromcode.c_str());
260  used_iconv = true;
261 #endif
262  }
263  }
264  else
265  {
266  //We are still in the headers
267  if ((header_separator_idx = s_buffer.find(':')) != std::string::npos)
268  {
269  //Header processing
270  header_name.assign(s_buffer.substr(0, header_separator_idx));
271  header_value.assign(s_buffer.substr(header_separator_idx + 1));
272  while ( header_value[header_value.length() - 1 ] == '\n' ||
273  header_value[header_value.length() - 1 ] == '\r' )
274  header_value.erase(header_value.length() - 1);
275  message_out(DEBUG, "ofx_proc_file():Header: " + header_name + " with value: " + header_value + " has been found");
276  if (header_name.compare("ENCODING") == 0)
277  {
278  ofx_encoding.assign(header_value);
279  }
280  if (header_name.compare("CHARSET") == 0)
281  {
282  ofx_charset.assign(header_value);
283  }
284  }
285  }
286  }
287 
288  if (file_is_xml == true || (ofx_start == true && ofx_end == false))
289  {
290  if (ofx_start == true)
291  {
292  /* The above test won't help us if the <OFX> tag is on the same line
293  * as the xml header, but as opensp can't be used to parse it anyway
294  * this isn't a great loss for now.
295  */
296  s_buffer = sanitize_proprietary_tags(s_buffer);
297  if (s_buffer.empty())
298  continue;
299  }
300  //cout<< s_buffer<<"\n";
301  if (file_is_xml == false)
302  {
303 #ifdef HAVE_ICONV
304  size_t inbytesleft = s_buffer.size();
305  size_t outbytesleft = inbytesleft * 2 - 1;
306  char * iconv_buffer = (char*) malloc (inbytesleft * 2);
307  memset(iconv_buffer, 0, inbytesleft * 2);
308  const char* inchar = s_buffer.c_str();
309  char * outchar = iconv_buffer;
310  int iconv_retval = iconv (conversion_descriptor,
311 #ifdef HAVE_ICONV_CONST
312  &inchar,
313 #else
314  const_cast<char**>(&inchar),
315 #endif
316  &inbytesleft, &outchar, &outbytesleft);
317  if (iconv_retval == -1)
318  {
319  message_out(ERROR, "ofx_proc_file(): Iconv conversion error");
320  }
321  // All validly converted bytes will be copied to the
322  // original buffer
323  s_buffer = std::string(iconv_buffer, outchar - iconv_buffer);
324  free (iconv_buffer);
325 #endif
326  }
327  //cout << s_buffer << "\n";
328  tmp_file << s_buffer << std::endl;
329  }
330 
331  if (ofx_start == true &&
332  (
333  (libofx_context->currentFileType() == OFX &&
334  ((ofx_start_idx = s_buffer.find("</OFX>")) != std::string::npos ||
335  (ofx_start_idx = s_buffer.find("</ofx>")) != std::string::npos))
336  || (libofx_context->currentFileType() == OFC &&
337  ((ofx_start_idx = s_buffer.find("</OFC>")) != std::string::npos ||
338  (ofx_start_idx = s_buffer.find("</ofc>")) != std::string::npos))
339  )
340  )
341  {
342  ofx_end = true;
343  message_out(DEBUG, "ofx_proc_file():</OFX> or </OFC> has been found");
344  }
345 
346  }
347  while (!input_file.eof() && !input_file.bad());
348  }
349  input_file.close();
350  tmp_file.close();
351 #ifdef HAVE_ICONV
352  if (used_iconv == true)
353  {
354  iconv_close(conversion_descriptor);
355  }
356 #endif
357  char filename_openspdtd[255];
358  char filename_dtd[255];
359  char filename_ofx[255];
360  STRNCPY(filename_openspdtd, find_dtd(ctx, OPENSPDCL_FILENAME)); //The opensp sgml dtd file
361  if (libofx_context->currentFileType() == OFX)
362  {
363  STRNCPY(filename_dtd, find_dtd(ctx, OFX160DTD_FILENAME)); //The ofx dtd file
364  }
365  else if (libofx_context->currentFileType() == OFC)
366  {
367  STRNCPY(filename_dtd, find_dtd(ctx, OFCDTD_FILENAME)); //The ofc dtd file
368  }
369  else
370  {
371  message_out(ERROR, std::string("ofx_proc_file(): Error unknown file format for the OFX parser"));
372  }
373 
374  if ((std::string)filename_dtd != "" && (std::string)filename_openspdtd != "")
375  {
376  strncpy(filename_ofx, tmp_filename, 255); //The processed ofx file
377  filenames[0] = filename_openspdtd;
378  filenames[1] = filename_dtd;
379  filenames[2] = filename_ofx;
380  int rv;
381  if (libofx_context->currentFileType() == OFX)
382  {
383  rv = ofx_proc_sgml(libofx_context, 3, filenames);
384  }
385  else if (libofx_context->currentFileType() == OFC)
386  {
387  rv = ofc_proc_sgml(libofx_context, 3, filenames);
388  }
389  else
390  {
391  message_out(ERROR, std::string("ofx_proc_file(): Error unknown file format for the OFX parser"));
392  rv = -1;
393  }
394  if (remove(tmp_filename) != 0)
395  {
396  message_out(ERROR, "ofx_proc_file(): Error deleting temporary file " + std::string(tmp_filename));
397  }
398  return rv;
399  }
400  else
401  {
402  message_out(ERROR, "ofx_proc_file(): FATAL: Missing DTD, aborting");
403  return -1;
404  }
405  }
406  else
407  {
408  message_out(ERROR, "ofx_proc_file():No input file specified");
409  return -1;
410  }
411  return 0;
412 }
413 
414 /* Searches input string for an opening or closing tag starting from pos_start.
415  * If found will return the tag_name and pos_start will be set to the string
416  * of the starting <, pos_end to the position after the closing '>'
417  * If the tag doesn't have a closing '>', pos_end will be set to string::npos.
418  */
419 static std::string find_tag_open (std::string& input_string, size_t& pos_start, size_t& pos_end)
420 {
421  pos_start = input_string.find ('<', pos_start);
422 
423  if (pos_start == std::string::npos)
424  {
425  pos_end = std::string::npos;
426  return std::string();
427  }
428 
429  pos_end = input_string.find ('>', pos_start + 1);
430  if (pos_end != std::string::npos)
431  pos_end = pos_end + 1;
432  size_t tag_size = (pos_end - 1) - (pos_start + 1);
433  return input_string.substr(pos_start + 1, tag_size);
434 }
435 
436 /* Searches input string for a closing tag matching tag_name starting at pos.
437  * If found pos will be set to the position right after of the closing '>'
438  * If no matching closing tag is found pos will be set to the start of the next
439  * opening or closing tag found.
440  */
441 static void find_tag_close (std::string& input_string, std::string& tag_name, size_t& pos)
442 {
443  size_t start_idx = input_string.find ("</" + tag_name + ">", pos);
444 
445  if (start_idx == std::string::npos)
446  {
447  start_idx = pos;
448  size_t end_idx;
449  std::string new_tag_name = find_tag_open (input_string, start_idx, end_idx);
450  if (!new_tag_name.empty())
451  {
452  message_out(DEBUG, "find_tag_close() fell back to next open tag: " + new_tag_name);
453  // find_tag_open returns the *end* of an opening tag, but in this
454  // case we want its start, so we need to rewind a bit..
455  pos = start_idx;
456  //printf("find_tag_close() returning pos after fallback: %d\n",pos);
457  }
458  else
459  {
460  pos = input_string.length();
461  }
462  }
463  else
464  {
465  pos = start_idx + tag_name.length() + 3;
466  }
467  return;
468 }
469 
470 
482 std::string sanitize_proprietary_tags(std::string input_string)
483 {
484  size_t last_known_good_pos = 0;
485  size_t open_tag_start_pos = last_known_good_pos;
486  size_t open_tag_end_pos;
487  size_t close_tag_end_pos;
488 
489  std::string tag_name = find_tag_open(input_string, open_tag_start_pos, open_tag_end_pos);
490  while (!tag_name.empty())
491  {
492  // Determine whether the current tag is proprietary.
493  if ((tag_name.find('.') != std::string::npos) || // tag has a . in the name
494  (tag_name == "CATEGORY")) // Chase bank started setting these in 2017
495  {
496  close_tag_end_pos = open_tag_end_pos;
497  find_tag_close (input_string, tag_name, close_tag_end_pos);
498  size_t tag_size = close_tag_end_pos - open_tag_start_pos;
499  std::string prop_tag = input_string.substr(open_tag_start_pos, tag_size);
500  message_out(INFO, "sanitize_proprietary_tags() removed: " + prop_tag);
501  input_string.erase(open_tag_start_pos, tag_size);
502  last_known_good_pos = open_tag_start_pos;
503  }
504  else
505  {
506  last_known_good_pos = open_tag_end_pos;
507  }
508  tag_name.clear();
509  open_tag_start_pos = last_known_good_pos;
510  if (last_known_good_pos != std::string::npos)
511  tag_name = find_tag_open(input_string, open_tag_start_pos, open_tag_end_pos);
512  }
513  return input_string;
514 }
515 
516 
517 #ifdef _WIN32
518 static std::string get_dtd_installation_directory()
519 {
520  // Partial implementation of
521  // http://developer.gnome.org/doc/API/2.0/glib/glib-Windows-Compatibility-Functions.html#g-win32-get-package-installation-directory
522  char ch_fn[MAX_PATH], *p;
523  std::string str_fn;
524 
525  if (!GetModuleFileName(NULL, ch_fn, MAX_PATH)) return "";
526 
527  if ((p = strrchr(ch_fn, '\\')) != NULL)
528  * p = '\0';
529 
530  p = strrchr(ch_fn, '\\');
531  if (p && (_stricmp(p + 1, "bin") == 0 ||
532  _stricmp(p + 1, "lib") == 0))
533  *p = '\0';
534 
535  str_fn = ch_fn;
536  str_fn += "\\share\\libofx\\dtd";
537 
538  return str_fn;
539 }
540 #endif
541 
542 
556 std::string find_dtd(LibofxContextPtr ctx, const std::string& dtd_filename)
557 {
558  std::string dtd_path_filename;
559  char *env_dtd_path;
560 
561  dtd_path_filename = reinterpret_cast<const LibofxContext*>(ctx)->dtdDir();
562  if (!dtd_path_filename.empty())
563  {
564  dtd_path_filename.append(dtd_filename);
565  std::ifstream dtd_file(dtd_path_filename.c_str());
566  if (dtd_file)
567  {
568  message_out(STATUS, "find_dtd():DTD found: " + dtd_path_filename);
569  return dtd_path_filename;
570  }
571  }
572 
573 #ifdef _WIN32
574  dtd_path_filename = get_dtd_installation_directory();
575  if (!dtd_path_filename.empty())
576  {
577  dtd_path_filename.append(DIRSEP);
578  dtd_path_filename.append(dtd_filename);
579  std::ifstream dtd_file(dtd_path_filename.c_str());
580  if (dtd_file)
581  {
582  message_out(STATUS, "find_dtd():DTD found: " + dtd_path_filename);
583  return dtd_path_filename;
584  }
585  }
586 #endif
587  /* Search in environment variable OFX_DTD_PATH */
588  env_dtd_path = getenv("OFX_DTD_PATH");
589  if (env_dtd_path)
590  {
591  dtd_path_filename = env_dtd_path;
592  dtd_path_filename.append(DIRSEP);
593  dtd_path_filename.append(dtd_filename);
594  std::ifstream dtd_file(dtd_path_filename.c_str());
595  if (!dtd_file)
596  {
597  message_out(STATUS, "find_dtd():OFX_DTD_PATH env variable was was present, but unable to open the file " + dtd_path_filename);
598  }
599  else
600  {
601  message_out(STATUS, "find_dtd():DTD found: " + dtd_path_filename);
602  return dtd_path_filename;
603  }
604  }
605 
606  for (int i = 0; i < DTD_SEARCH_PATH_NUM; i++)
607  {
608  dtd_path_filename = DTD_SEARCH_PATH[i];
609  dtd_path_filename.append(DIRSEP);
610  dtd_path_filename.append(dtd_filename);
611  std::ifstream dtd_file(dtd_path_filename.c_str());
612  if (!dtd_file)
613  {
614  message_out(DEBUG, "find_dtd():Unable to open the file " + dtd_path_filename);
615  }
616  else
617  {
618  message_out(STATUS, "find_dtd():DTD found: " + dtd_path_filename);
619  return dtd_path_filename;
620  }
621  }
622 
623  /* Last resort, look in source tree relative path (useful for development) */
624  dtd_path_filename = "";
625  dtd_path_filename.append("..");
626  dtd_path_filename.append(DIRSEP);
627  dtd_path_filename.append("dtd");
628  dtd_path_filename.append(DIRSEP);
629  dtd_path_filename.append(dtd_filename);
630  std::ifstream dtd_file(dtd_path_filename.c_str());
631  if (!dtd_file)
632  {
633  message_out(DEBUG, "find_dtd(): Unable to open the file " + dtd_path_filename + ", most likely we are not in the source tree.");
634  }
635  else
636  {
637  message_out(STATUS, "find_dtd():DTD found: " + dtd_path_filename);
638  return dtd_path_filename;
639  }
640 
641 
642  message_out(ERROR, "find_dtd():Unable to find the DTD named " + dtd_filename);
643  return "";
644 }
ofx_preproc.hh
Preprocessing of the OFX files before parsing.
OFX
@ OFX
Definition: inc/libofx.h:140
ofc_sgml.hh
OFX/SGML parsing functionality.
DTD_SEARCH_PATH
const char * DTD_SEARCH_PATH[DTD_SEARCH_PATH_NUM]
The list of paths to search for the DTDs.
Definition: ofx_preproc.cpp:66
ofc_proc_sgml
int ofc_proc_sgml(LibofxContext *libofx_context, int argc, char *const *argv)
Parses a DTD and OFX file(s)
Definition: ofc_sgml.cpp:346
find_dtd
std::string find_dtd(LibofxContextPtr ctx, const std::string &dtd_filename)
Find the appropriate DTD for the file version.
Definition: ofx_preproc.cpp:556
ERROR
@ ERROR
Definition: messages.hh:41
ofx_utilities.hh
Various simple functions for type conversion & al.
LibofxContext
Definition: context.hh:23
OFC
@ OFC
Definition: inc/libofx.h:141
sanitize_proprietary_tags
std::string sanitize_proprietary_tags(std::string input_string)
Removes proprietary tags and comments.
Definition: ofx_preproc.cpp:482
message_out
int message_out(OfxMsgType error_type, const std::string message)
Message output function.
Definition: messages.cpp:67
STRNCPY
void STRNCPY(T &dest, const std::string &src)
Definition: ofx_utilities.hh:35
INFO
@ INFO
Definition: messages.hh:39
DTD_SEARCH_PATH_NUM
const int DTD_SEARCH_PATH_NUM
The number of different paths to search for DTDs.
Definition: ofx_preproc.cpp:60
ofx_proc_file
int ofx_proc_file(LibofxContextPtr ctx, const char *p_filename)
File pre-processing of OFX AND for OFC files.
Definition: ofx_preproc.cpp:80
ofx_proc_sgml
int ofx_proc_sgml(LibofxContext *libofx_context, int argc, char *const *argv)
Parses a DTD and OFX file(s)
Definition: ofx_sgml.cpp:444
ofx_sgml.hh
OFX/SGML parsing functionality.
STATUS
@ STATUS
Definition: messages.hh:38
WARNING
@ WARNING
Definition: messages.hh:40
messages.hh
Message IO functionality.
DEBUG
@ DEBUG
Definition: messages.hh:32