Initializing help system before first use

XPRMaddparamstr

Purpose
Add a parameter definition to a parameter string.
Synopsis
int XPRMaddparamstr(char **parlist,size_t *maxlen,const char *parm);
Arguments
parlist 
Reference to the buffer holding the parameter string (that may be NULL)
maxlen 
Reference to the size of the buffer of the parameter string (its value must be 0 if the buffer is NULL)
parm 
The parameter to add. It must be of the form paramname=value
Return value
0 if successful, 1 if memory cannot be allocated.
Example
char *parstr=NULL;
size_t maxlen=0;

XPRMaddparamstr(&parstr,&maxlen,"P1=10");
XPRMaddparamstr(&parstr,&maxlen,"P2=some text");
printf("%s\n",parstr);
free(parstr);
Further information
1. This function helps constructing the parameter string to be passed to XPRMrunmod by appending to an existing parameter string a new definition with the appropriate quoting.
2. The routine performs memory allocation and expects the provided buffer to have been allocated with the C function malloc (it is automatically reallocated as necessary). Note that the size pointed by maxlen corresponds to the size of the buffer, not the length of the parameter string (that will always be smaller).
Related topics

© 2001-2024 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.