tf_default(), sf_default()

Purpose

Gives the default path name for DP4 system files

Old names

#define _vfdefault tf_default
#define _afdefault sf_default

Syntax (CCOWN)

char* tf_default(void)
char* sf_default(void)

Syntax (DP4DBAPI)

dp4_name_string dp4_sf_default(CONN * conn,char * path_buffer,size_t buffer_size);

Description

The tf_default() and sf_default() functions get the name of the directory used to read the DP4 licence file and return a pointer to a static buffer containing this name. In the DP4DBAPI version of this API you must pass a pointer to a buffer, which should be at least 256 bytes in size. Currently the database manager does not check that the buffer is actually larget enough to hold the value, and the buffer_size parameter is ignored.

Return values

Returns a constructed pointer to the disk and path name

See also

trm_read_user() tf_read_sysdata()

Example

/*
C Functions Reference Manual
----------------------------
Filename: TF_DEFAU.C
Example: tf_default
Purpose: Simple program to display the disk and
path name of the where DATAFIT.SYS is
*/

/*
#db salesord
#c
#end
*/

#include "dp4.h"
#include "tf_defau.h"
/* generate this file by running LIBMAKE */
void process()
{
map_load("TF_DEFAU"); /* load the maps */
map_draw(1,RETAIN);
/* put up map which will display directory */
show_c(1,1,tf_default());
/* get and display */
trm_refresh();
/* make it visible and terminate */
}