Table of Contents

NAME

QccInit - QccPack library initialization

SYNOPSIS

#include "libQccPack.h"

void QccInit(int argc, char *argv[]);

DESCRIPTION

QccInit() initializes the QccPack library routines for use. It should be called at the start of each program making use of the QccPack libraries. argc and argv contain the command-line parameters from main(); however, no command-line parsing is performed by QccInit() (for command-line parsing, use QccParseParameters(3) ); rather, the name of the calling program is extracted from argv. A NULL pointer can optionally be passed for argv; in this case, QccPack will not know the name of the current program, and QccGetProgramName(3) will return in error if called.

Calls to QccInit() subsequent to the first call (e.g., from other threads in multithreaded applications) have no effect other than extracting the program name again from argv.

EXAMPLE

The typical use of QccInit() is illustrated below. Note that QccInit() is called as the first statement of the main() routine.

#include "libQccPack.h"

#define USG_STRING "%s:infile"

QccString Filename;

int main(int argc, char *argv[])
{
   QccInit(&argc, argv);

   if (QccParseParameters(argc, argv, USG_STRING, Filename))
    QccErrorExit();

   <user code goes here>

   QccExit;
}

SEE ALSO

QccParseParameters(3) , QccGetProgramName(3) , QccExit(3) , QccErrorExit(3) , QccPack(3)

AUTHOR

Copyright (C) 1997-2021 James E. Fowler


Table of Contents



Get QccPack at SourceForge.net. Fast, secure and Free Open Source software downloads