wrc.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /*
  2. * Main definitions and externals
  3. *
  4. * Copyright 1998 Bertho A. Stultiens (BS)
  5. *
  6. * This library is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU Lesser General Public
  8. * License as published by the Free Software Foundation; either
  9. * version 2.1 of the License, or (at your option) any later version.
  10. *
  11. * This library is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * Lesser General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU Lesser General Public
  17. * License along with this library; if not, write to the Free Software
  18. * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  19. */
  20. #ifndef __WRC_WRC_H
  21. #define __WRC_WRC_H
  22. #include "wrctypes.h"
  23. /* From wrc.c */
  24. extern int debuglevel;
  25. #define DEBUGLEVEL_NONE 0x0000
  26. #define DEBUGLEVEL_CHAT 0x0001
  27. #define DEBUGLEVEL_DUMP 0x0002
  28. #define DEBUGLEVEL_TRACE 0x0004
  29. #define DEBUGLEVEL_PPMSG 0x0008
  30. #define DEBUGLEVEL_PPLEX 0x0010
  31. #define DEBUGLEVEL_PPTRACE 0x0020
  32. extern int win32;
  33. extern int extensions;
  34. extern int pedantic;
  35. extern int preprocess_only;
  36. extern int no_preprocess;
  37. extern int utf8_input;
  38. extern int check_utf8;
  39. extern const char *input_name;
  40. extern const char *nlsdirs[];
  41. extern int line_number;
  42. extern int char_number;
  43. extern resource_t *resource_top;
  44. extern language_t *currentlanguage;
  45. void verify_translations(resource_t *top);
  46. void write_pot_file( const char *outname );
  47. void write_po_files( const char *outname );
  48. void add_translations( const char *po_dir );
  49. void write_resfile(char *outname, resource_t *top);
  50. static inline void set_location( location_t *loc )
  51. {
  52. loc->file = input_name;
  53. loc->line = line_number;
  54. loc->col = char_number;
  55. }
  56. static inline void print_location( const location_t *loc )
  57. {
  58. if (loc->file) fprintf(stderr, "%s:%d:%d: ", loc->file, loc->line, loc->col );
  59. }
  60. #endif