wrc.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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 byteorder;
  36. extern int preprocess_only;
  37. extern int no_preprocess;
  38. extern int utf8_input;
  39. extern int check_utf8;
  40. extern char *input_name;
  41. extern char *cmdline;
  42. extern const char *nlsdirs[];
  43. extern int line_number;
  44. extern int char_number;
  45. extern resource_t *resource_top;
  46. extern language_t *currentlanguage;
  47. void verify_translations(resource_t *top);
  48. void write_pot_file( const char *outname );
  49. void write_po_files( const char *outname );
  50. void add_translations( const char *po_dir );
  51. void write_resfile(char *outname, resource_t *top);
  52. static inline void set_location( location_t *loc )
  53. {
  54. loc->file = input_name;
  55. loc->line = line_number;
  56. loc->col = char_number;
  57. }
  58. static inline void print_location( const location_t *loc )
  59. {
  60. if (loc->file) fprintf(stderr, "%s:%d:%d: ", loc->file, loc->line, loc->col );
  61. }
  62. #endif