c c G_ARGC is used to deal with compiler differences c integer function g_argc() c c + + + PURPOSE + + + c The WATCOM compiler returns a value that includes the cmd name/path. c The Unix compiler returns a value that includes only the args. c This function takes care of the discrepancy by using the WATCOM c directives to trigger additional code to get both compilers to c return the same value (number of args EXCLUDING the cmd name/path). c c + + + KEYWORDS + + + c iargc, utility c c + + + ARGUMENT DECLARATIONS + + + c c + + + ARGUMENT DEFINITIONS + + + c c + + + PARAMETERS + + + c *$INCLUDE fsublib.fi C Use the following DEFINE to trigger specific code for WATCOM compiler *$ifndef WATCOM *$define WATCOM *$endif c c + + + LOCAL VARIABLES + + + c C Declaration of internal Unix function C (Want to hide from Watcom compiler) *$ifndef WATCOM integer iargc *$endif c c + + + END SPECIFICATIONS + + + c g_argc = iargc() C Correct for differences between "iargc" among compilers *$ifndef WATCOM C Note that the Unix compiler will see this line but not WATCOM g_argc = g_argc + 1 *$else C Note that both the Unix and the WATCOM compiler will see this line g_argc = g_argc - 1 *$endif return end