home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / snip9707.zip / NUMCNVRT.H < prev    next >
C/C++ Source or Header  |  1997-07-05  |  2KB  |  65 lines

  1. /* +++Date last modified: 05-Jul-1997 */
  2.  
  3. /*
  4. **  NUMCNVRT.H - Header file for SNIPPETS numerical <=> string conversions
  5. */
  6.  
  7. #ifndef NUMCNVRT__H
  8. #define NUMCNVRT__H
  9.  
  10. #include <stddef.h>     /* For size_t     */
  11. #include "sniptype.h"
  12. #include "round.h"
  13. #include "pi.h"
  14.  
  15. #define R_ERROR -2                              /* EVAL.C Range error   */
  16.  
  17. /*
  18. **  Callable library functions begin here
  19. */
  20.  
  21. char  * base_convert(const char *in, char *out,
  22.             size_t len, int rin, int rout);           /* Bascnvrt.C     */
  23. char  * comma_float(double num, char *buf, int dec);  /* Commaflt.C     */
  24. size_t  commafmt(char *buf, int bufsize, long N);     /* Commafmt.C     */
  25. char  * eng(double value, int places);                /* Eng.C          */
  26. int     evaluate(char *line, double *val);            /* Eval.C         */
  27. char  * fmt_money(double amt);                        /* Fmtmoney.C     */
  28. long    hexorint(const char *string);                 /* Hexorint.C     */
  29.  
  30. char  * ltostr(long num, char *string,
  31.            size_t max_chars, unsigned base);      /* Ltostr.C       */
  32.  
  33. char  * ordinal_text(int number);                     /* Ord_Text.C     */
  34. int     scanfrac (const char buf[], double *f);       /* Scanfrac.C     */
  35.  
  36. unsigned int hstr_i(char *cptr);                      /* Hstr_I.C       */
  37.  
  38. char *long2roman(long val, char *buf, size_t buflen); /* L2Roman.C      */
  39. long  roman2long(const char *str);                    /* Roman2L.C      */
  40.  
  41.  
  42. #if defined(__ZTC__) && !defined(__SC__)
  43.  char * ltoa(long val, char *buf, int base);          /* Ltoa.C         */
  44. #endif
  45.  
  46.  
  47. /*
  48. **  File: STR27SEG.C
  49. */
  50.  
  51. struct Seg7disp {
  52.       unsigned seg_a : 1;
  53.       unsigned seg_b : 1;
  54.       unsigned seg_c : 1;
  55.       unsigned seg_d : 1;
  56.       unsigned seg_e : 1;
  57.       unsigned seg_f : 1;
  58.       unsigned seg_g : 1;
  59. };
  60.  
  61. char *str27seg(char *string);
  62.  
  63.  
  64. #endif /* NUMCNVRT__H */
  65.