Changeset 43


Ignore:
Timestamp:
Mar 30, 2018, 10:15:10 PM (7 years ago)
Author:
Alex Taylor
Message:

Minor code cleanup

Location:
rxutilex/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • rxutilex/trunk

    • Property svn:ignore set to
      *.[Dd][Ll][Ll]
      *.[Ii][Nn][Ff]
      *.[Mm][Aa][Pp]
      *.[Oo][Bb][Jj]
      *.[Zz][Ii][Pp]
  • rxutilex/trunk/rxutilex.c

    r42 r43  
    102102
    103103    static const char *PSZ_ZERO = "0";
    104     static const char *PSZ_ONE = "1";
     104    static const char *PSZ_ONE  = "1";
    105105#endif
    106106
     
    113113#define US_PIPESTATUS_MAXZ      128                                  // ...of a pipe status string
    114114#define US_DISKINFO_MAXZ        128                                  // ...of a disk information string
     115#define US_FRACSTR_MAXZ         21                                   // ...of a fraction string
    115116
    116117#define UL_SSBUFSIZE            0xFFFF      // Buffer size for the DosQuerySysState() data
     
    10711072 * REXX ARGUMENTS:                                                           *
    10721073 *   1. Number to be formatted.                                   (REQUIRED) *
    1073  *   2. Number of decimal places to use for floating point                   *
    1074  *      values.  Ignored for integer values.                    (DEFAULT: 2) *
     1074 *   2. Number of decimal places to use for floating point values            *
     1075 *      (max 18).  Ignored for integer values.                  (DEFAULT: 2) *
    10751076 *                                                                           *
    10761077 * REXX RETURN VALUE: The formatted number, or "" on error.                  *
     
    10871088    int   iVal;                         // Input value as integer
    10881089#else
    1089     LONGLONG    llVal  = 0;
    1090     long double ldVal  = 0,
    1091                 ldFrac = 0;
    1092     PSZ         p,
    1093                 a;
    1094     BOOL        bNeg   = FALSE;
    1095     CHAR        achFrac[ 16 ];
    1096     int         rc     = 0;
     1090    LONGLONG    llVal  = 0;             // Input value as integer
     1091    long double ldVal  = 0,             // Input value as floating point
     1092                ldFrac = 0;             // Input fraction portion
     1093    PSZ   p,                            // Pointer to fraction
     1094          a;                            // Pointer to absolute value
     1095    CHAR  achFrac[ US_FRACSTR_MAXZ ];   // Fraction portion as string
     1096    int   rc = 0;
    10971097#endif
    10981098
     
    12191219        {
    12201220            // Use user-specified precision
     1221            if ( iPrec > 18 ) iPrec = 18;
    12211222            sprintf( achFrac, "%.*Lf", iPrec, ldFrac );
    12221223        }
  • rxutilex/trunk/rxutilex.def

    r42 r43  
    11LIBRARY     RXUTILEX INITINSTANCE TERMINSTANCE
    22DATA        MULTIPLE NONSHARED
    3 DESCRIPTION '@#Alex Taylor:0.1.6#@##1## 30 Mar 2018 14:26:03     REINFORCE::::::@@Extended REXX Utility Functions'
     3DESCRIPTION '@#Alex Taylor:0.1.6#@##1## 30 Mar 2018 16:11:36     REINFORCE::::::@@Extended REXX Utility Functions'
    44
    55EXPORTS     Sys2LoadFuncs
Note: See TracChangeset for help on using the changeset viewer.