FORM v5.0.0-35-g6318119
Macros | Functions | Variables
startup.c File Reference
#include "form3.h"
#include "inivar.h"
#include <signal.h>
Include dependency graph for startup.c:

Go to the source code of this file.

Macros

#define STRINGIFY(x)   STRINGIFY__(x)
 
#define STRINGIFY__(x)   #x
 
#define FORMNAME   "FORM"
 
#define VERSIONSTR__   STRINGIFY(MAJORVERSION) "." STRINGIFY(MINORVERSION) "." STRINGIFY(PATCHVERSION)
 
#define VERSIONSTR   FORMNAME " " VERSIONSTR__ " (" PRODUCTIONDATE ")"
 
#define TAKEPATH(x)   if(s[1]== '=' ){x=s+2;} else{x=*argv++;argc--;}
 
#define DEFAULTFNAMELENGTH   16
 
#define STR2(x)   #x
 
#define STR(x)   STR2(x)
 

Functions

int DoTail (int argc, UBYTE **argv)
 
int OpenInput (void)
 
void ReserveTempFiles (int par)
 
void StartVariables (void)
 
void StartMore (void)
 
void IniVars (void)
 
int main (int argc, char **argv)
 
void CleanUp (WORD par)
 
void TerminateImpl (int errorcode, const char *file, int line, const char *function)
 
void PrintDeprecation (const char *feature, const char *issue)
 
void PrintRunningTime (void)
 
LONG GetRunningTime (void)
 

Variables

UBYTE * emptystring = (UBYTE *)"."
 
UBYTE * defaulttempfilename = (UBYTE *)"xformxxx.str"
 

Detailed Description

This file contains the main program. It also deals with the very early stages of the startup of FORM and the final stages when the program attempts some cleanup. Here is the routine that analyses the command tail.

Definition in file startup.c.

Macro Definition Documentation

◆ STRINGIFY

#define STRINGIFY (   x)    STRINGIFY__(x)

Definition at line 57 of file startup.c.

◆ STRINGIFY__

#define STRINGIFY__ (   x)    #x

Definition at line 58 of file startup.c.

◆ FORMNAME

#define FORMNAME   "FORM"

Definition at line 68 of file startup.c.

◆ VERSIONSTR__

#define VERSIONSTR__   STRINGIFY(MAJORVERSION) "." STRINGIFY(MINORVERSION) "." STRINGIFY(PATCHVERSION)

Definition at line 100 of file startup.c.

◆ VERSIONSTR

#define VERSIONSTR   FORMNAME " " VERSIONSTR__ " (" PRODUCTIONDATE ")"

Definition at line 102 of file startup.c.

◆ TAKEPATH

#define TAKEPATH (   x)    if(s[1]== '=' ){x=s+2;} else{x=*argv++;argc--;}

Definition at line 280 of file startup.c.

◆ DEFAULTFNAMELENGTH

#define DEFAULTFNAMELENGTH   16

Definition at line 711 of file startup.c.

Function Documentation

◆ DoTail()

int DoTail ( int  argc,
UBYTE **  argv 
)

Definition at line 282 of file startup.c.

◆ OpenInput()

int OpenInput ( void  )

Definition at line 589 of file startup.c.

◆ ReserveTempFiles()

void ReserveTempFiles ( int  par)

Definition at line 713 of file startup.c.

◆ StartVariables()

void StartVariables ( void  )

All functions (well, nearly all) are declared here.

Definition at line 952 of file startup.c.

References AddNtoC(), AddRHS(), Compare1(), inicbufs(), FuNcTiOn::name, PF_BroadcastNumber(), PutPreVar(), and FuNcTiOn::symmetric.

Here is the call graph for this function:

◆ StartMore()

void StartMore ( void  )

Definition at line 1386 of file startup.c.

◆ IniVars()

void IniVars ( void  )

Definition at line 1424 of file startup.c.

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 1731 of file startup.c.

◆ CleanUp()

void CleanUp ( WORD  par)

Definition at line 1833 of file startup.c.

◆ TerminateImpl()

void TerminateImpl ( int  errorcode,
const char *  file,
int  line,
const char *  function 
)

Definition at line 1922 of file startup.c.

◆ PrintDeprecation()

void PrintDeprecation ( const char *  feature,
const char *  issue 
)

Prints a deprecation warning for a given feature.

Parameters
featureThe name of the deprecated feature.
issueThe associated issue, e.g., "issues/700".

Definition at line 2142 of file startup.c.

◆ PrintRunningTime()

void PrintRunningTime ( void  )

Definition at line 2166 of file startup.c.

◆ GetRunningTime()

LONG GetRunningTime ( void  )

Definition at line 2207 of file startup.c.

Variable Documentation

◆ emptystring

UBYTE* emptystring = (UBYTE *)"."

Definition at line 707 of file startup.c.

◆ defaulttempfilename

UBYTE* defaulttempfilename = (UBYTE *)"xformxxx.str"

Definition at line 708 of file startup.c.