dc_totime()

Formats a string in a field and places it in a time data variable

Call
#include <vv_time.h>
int dc_totime(stp, datap, dfldp, cvbufp)

UCHAR *stp

Pointer to string with user's field input

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_totime() copies the string containing the user's field input into the data variable. If necessary, the string is first reformatted to agree with the field's time format string.

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_frtime(), vf_time()

Cautions

No error checking is performed by this function. dc_totime() assumes that vf_time() has already validated the string.


Home Contents Previous Next