Main Page | Modules | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

t_tc_load.c File Reference


Detailed Description

For internal use only.

This test program is used to test the operation of the tc_load() function.

Definition in file t_tc_load.c.

#include "test-harness.h"
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "treeconf_int.h"

Include dependency graph for t_tc_load.c:

Include dependency graph

Go to the source code of this file.

Defines

#define RES_CHUNK
 Result chunk.
#define RES_BUFSIZE
 File input buffer size.

Functions

char ** load_results (treeconf_ctx_t *ctx, const char *file)
 Load results file.
int main (int argc, char **argv)
 Test program for tc_load().

Variables

const char * prog
 Program name.


Define Documentation

#define RES_BUFSIZE
 

For internal use only.

This macro specifies the size of the buffer to use for loading lines from the results file.

Definition at line 57 of file t_tc_load.c.

#define RES_CHUNK
 

For internal use only.

This macro specifies the number of result pointers to allocate at once.

Definition at line 49 of file t_tc_load.c.

Referenced by load_results().


Function Documentation

char** load_results treeconf_ctx_t ctx,
const char *  file
[static]
 

For internal use only.

This function loads the results file, registering all the variables that are listed by that file. It returns an array of strings indicating the expected results for tc_load().

Parameters:
ctx A pointer to a treeconf_ctx_t.
file The name of the file to load.
Returns:
An array of "variable=value" strings.

Definition at line 81 of file t_tc_load.c.

References prog, RES_CHUNK, tc_register(), and treeconf_ctx_t.

Referenced by main().

Here is the call graph for this function:

int main int  argc,
char **  argv
 

For internal use only.

This program is used for testing the treeconf library's tc_load() function, for loading a configuration from a file.

Definition at line 151 of file t_tc_load.c.

References load_results(), prog, tc_get(), tc_load(), and treeconf_ctx_t.

Here is the call graph for this function:


Variable Documentation

const char* prog [static]
 

For internal use only.

This variable simply contains a pointer to the program name for error messages.

Definition at line 65 of file t_tc_load.c.

Referenced by load_results(), and main().


Generated on Wed Jun 8 09:18:29 2005 for treeconf by  doxygen 1.3.9.1