Inter-Corporate Computer & Network Services, inc.

ICELIB0.NLM   →   ICE_ParseCmdLine()

ICE_ParseCmdLine

Description:
Converts a user's command line parameters into a static array.
 
Syntax for C:
void *ICE_ParseCmdLine (
  char *commandLineBuffer,
  unsigned int flags
);
 
Syntax for Assembly:
Call ICE_ParseCmdLine C, offset commandLineBuffer, [flags]
 
Parameters:
commandLineBuffer
(IN) Points to the null-terminated buffer or string to be parsed.
 
flags
(IN) Some rules to be enforced during parsing.  All undocumented bit flags are considered reserved for future use, and should remain cleared (0) to ensure upward compatibility with newer versions of ICELIB0.NLM.  Currently supported flags are as follows:

1 = Convert all commands to lower case (non-destructive)

2 = Don't convert TABs ("\t") to spaces

4 = Second through last elements will be delimited with spaces instead of NULLs so the remaining elements can be handled as a single string

16 = Enable colons (":") to be treated like spaces, but without omitting the colon
 

Returns:
Pointer to buffer (created by malloc()) that holds the static array of command line parameters, if not 0 or -1

0 = No buffer created

-1 = Not enough memory (malloc() failed)
 

Remarks:
Last pointer in array is NULL.  If three parameters are processed, the resulting array will have four pointers and three elements, with the final pointer being NULL.

Remember to use NetWare's free() function when you no longer need the array.
 

Resource files:
icelib0.imp
 
Minimum library version:
1.07
 
Solutions Services Support Products Home Login Company Contact
Copyright © 1992-2024 Inter-Corporate Computer & Network Services, Inc.  All rights reserved.  All trademarks are the property of their respective owners.  The information provided on this internet site does not constitute a contract with any person or entity unless otherwise specified.  Although reasonable efforts are made to present accurate information, we do not guarantee it.  Information may change without prior notice.