c c G_ARGV is used to deal with compiler differences c integer function g_argv i (iarg, o argv) c c + + + PURPOSE + + + c The WATCOM compiler implements "igetarg(iarg,argv)" as a function. c The Unix compiler implements "getarg(iarg,argv)" as a subroutine. c This function takes care of the discrepancy by using the WATCOM c directives to trigger necessary code to get both compilers to c return the same values (without other changes in the source code). c + + + KEYWORDS + + + c getarg, utility c c + + + ARGUMENT DECLARATIONS + + + integer iarg character*(*) argv c c + + + ARGUMENT DEFINITIONS + + + c iarg - number of arg on cmdline to read in (zero is cmd path/name) c argv - character variable to hold the specified cmdline argument c c + + + PARAMETERS + + + c *$INCLUDE fsublib.fi c 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 arg variable length c - obtained directly from WATCOM igetarg() function c - computed using the lnblnk() function under Unix integer arglen c Required for Unix compiler integer lnblnk c c + + + END SPECIFICATIONS + + + c *$ifndef WATCOM call getarg (iarg, argv) arglen = lnblnk (argv) *$else *$INCLUDE util/getarg.fi *$endif c return the lenth of the argument (# of char's) g_argv = arglen return end