#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include "include/ift.h"
#include "include/quots.h"
#include "include/substitutions.h"
#include "include/datetime.h"
Functions | |
int | iftRead (IFT *ift, char *filename, int is_key_required) |
int | iftWriteItem (IFT *ift, int item, FILE *fp) |
int | iftWrite (IFT *ift, char *filename) |
Variables | |
int | IFT_SPACE_BEFORE_EQ_SIGN = 1 |
int | IFT_SPACE_AFTER_EQ_SIGN = 1 |
int iftRead | ( | IFT * | ift, |
char * | filename, | ||
int | is_key_required | ||
) |
Read IFT file keys and values. Previous contents of IFT are preserved. This function can read the initial ASCII part of files that contain also binary data.
ift | Pointer to initiated but empty IFT |
filename | Input filename |
is_key_required | 0=key name is not required, 1=only lines with key and equals sign are read |
References IFT_TEST, iftEmpty(), iftPut(), iftSetStatus(), istime(), IFT::keyNr, strstr_noquotation(), and IFT::type.
int iftWrite | ( | IFT * | ift, |
char * | filename | ||
) |
Write all keys and values.
ift | Pointer to initiated but empty IFT |
filename | Output filename; string "stdout" is identified |
References IFT_TEST, iftSetStatus(), iftWriteItem(), and IFT::keyNr.
int iftWriteItem | ( | IFT * | ift, |
int | item, | ||
FILE * | fp | ||
) |
Write one item in IFT to the specified file pointer.
ift | Pointer to initiated but empty IFT |
item | Index [0..keyNr-1] of key and value to print |
fp | Output file pointer |
References IFT_SPACE_AFTER_EQ_SIGN, IFT_SPACE_BEFORE_EQ_SIGN, IFT_TEST, iftSetStatus(), IFT::item, IFT_KEY_AND_VALUE::key, IFT::keyNr, IFT_KEY_AND_VALUE::type, IFT::type, and IFT_KEY_AND_VALUE::value.
Referenced by iftWrite().
int IFT_SPACE_AFTER_EQ_SIGN = 1 |
Referenced by iftWriteItem().
int IFT_SPACE_BEFORE_EQ_SIGN = 1 |
Referenced by iftWriteItem().