dc_tost()

Formats a string in a field according to the field options and places it in a string data variable

Call
#include <vv_str.h>
int dc_tost(stp, datap, dfldp, cvbufp)

PTR datap

Pointer to variable to receive converted field input

DFIELDPTR dfldp Pointer to a data field structure
PTR cvbufp Pointer to a data conversion buffer
Returns  
1 Success. This is the only return value for this function
Description

dc_tost() copies the string containing the user's field input into the data variable.

If PICSKIP is ON, the protected characters in the field string are deleted before the string is placed in the data variable.

If TRAILBLANKS is ON, trailing blanks are retained. If TRAILBLANKS is OFF, trailing blanks are stripped by placing the null terminator '\0' after the last non-blank character in the string.

The defaults are to retain the protected characters (PICSKIP is OFF) and to strip the trailing blanks (TRAILBLANKS is OFF).

Related Functions

dc_frst(), vf_st()

Cautions

No error checking is performed by this function.


Home Contents Previous Next