local_proto.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. /* exit codes */
  2. #define SP_FATAL 1 /* [ G_fatal_error () returns 1 ] */
  3. #define SP_NOCHANGE 2
  4. #define SP_UNKNOWN 3
  5. /* $GISBASE-relative locations of parameter files */
  6. #define STP1927PARAMS "/etc/proj/state27"
  7. #define STP1983PARAMS "/etc/proj/state83"
  8. #define RADIUS_DEF 6370997.
  9. struct proj_unit
  10. {
  11. const char *units;
  12. const char *unit;
  13. double fact;
  14. };
  15. struct proj_desc
  16. {
  17. const char *name;
  18. const char *type;
  19. const char *key;
  20. const char *desc;
  21. };
  22. struct proj_parm
  23. {
  24. const char *name;
  25. int ask;
  26. int def_exists;
  27. double deflt;
  28. };
  29. /* get_deg.c */
  30. int get_deg(char *, int);
  31. /* get_num.c */
  32. int get_double(const struct proj_parm *, const struct proj_desc *, double *);
  33. int get_int(const struct proj_parm *, const struct proj_desc *, int *);
  34. int get_LL_stuff(const struct proj_parm *, const struct proj_desc *, int,
  35. double *);
  36. int get_zone(void);
  37. double prompt_num_double(char *, double, int);
  38. int prompt_num_int(char *, int, int);
  39. /* get_stp.c */
  40. void get_stp_proj(char[]);
  41. int get_stp_code(int, char *, char *);
  42. int get_stp_num(void);
  43. int ask_fips(FILE *, int *, int *, int *);
  44. /* main.c */
  45. /* some global variables */
  46. extern int ier, proj_index, zone, snum, spath;
  47. extern double radius, kfact, mfact, msfact, nfact, qfact,
  48. wfact, unit_fact, x_false, y_false, heigh, azim, tilt;
  49. int min1(int, int);
  50. #ifdef __GNUC_MINOR__
  51. int leave(int) __attribute__ ((__noreturn__));
  52. #else
  53. int leave(int);
  54. #endif
  55. /* this is from gislib! */
  56. /* table.c */
  57. int init_table(void);
  58. int get_proj_index(char *);
  59. int init_unit_table(void);
  60. /* get_datum.c */
  61. int ask_datum(char *, char *, char *);
  62. /* proj.c */
  63. struct proj_unit *get_proj_unit(const char *arg);
  64. struct proj_desc *get_proj_desc(const char *arg);
  65. struct proj_parm *get_proj_parms(const char *arg);