FOSSology  4.4.0
Open Source License Compliance by Open Source Software
utils.c File Reference

Miscellaneous utility functions for demomod. More...

#include "demomod.h"
Include dependency graph for utils.c:

Go to the source code of this file.

Functions

FUNCTION void CheckTable (char *AgentARSName)
 Check to make sure the demomod and demomod_ars tables exists. More...
 
FUNCTION void Char2Hex (char *InBuf, int NumBytes, char *OutBuf)
 Convert a character buffer to a hex string. More...
 
FUNCTION void ExitNow (int ExitVal)
 Exit function. This does all cleanup and should be used instead of calling exit() or main() return. More...
 

Variables

psqlCopy_t psqlcpy
 fo_sqlCopy struct used for fast data insertion
 
PGconn * pgConn
 Database connection. More...
 

Detailed Description

Miscellaneous utility functions for demomod.

Definition in file utils.c.

Function Documentation

◆ Char2Hex()

FUNCTION void Char2Hex ( char *  InBuf,
int  NumBytes,
char *  OutBuf 
)

Convert a character buffer to a hex string.

Parameters
InBufInput buffer
NumBytesNumber of input characters to process
OutBufOutput buffer (must be large enough to hold output including null terminator)
Returns
void

Definition at line 91 of file utils.c.

◆ CheckTable()

FUNCTION void CheckTable ( char *  AgentARSName)

Check to make sure the demomod and demomod_ars tables exists.

If they don't, then create them. This is also where you would make any table changes for new versions if you aren't part of the fossology release (which uses core-schema.dat).

Parameters
AgentARSNameName of _ars table
Returns
void Can call ExitNow() on fatal error.

Definition at line 27 of file utils.c.

◆ ExitNow()

FUNCTION void ExitNow ( int  ExitVal)

Exit function. This does all cleanup and should be used instead of calling exit() or main() return.

Parameters
ExitValExit value
Returns
void Calls exit()

Definition at line 108 of file utils.c.

Variable Documentation

◆ pgConn

PGconn* pgConn
extern

Database connection.

Database connection.

Definition at line 86 of file adj2nest.c.