proteus  1.8.1
C/C++/Fortran libraries
Macros | Functions
jf.h File Reference
#include <math.h>
#include <stdio.h>
#include <conio.h>
#include <stdlib.h>
#include <string.h>
Include dependency graph for jf.h:

Go to the source code of this file.

Macros

#define ANSI
 
#define D(x, y)   printf(" "#x":%"#y, x)
 
#define Diag(x, y)   if(diagon=='y') {fprintf(diag,"\n" #x"\t%"#y"\t", x); fflush(diag);}
 
#define Diag_Maple(x, y)   fprintf(diag,"\n\# "#x" = %"#y";", x);
 
#define For(x, y, z)   for((x)=(y);(x)<=(z);(x)++)
 
#define Write(x, y, z)   fprintf(out,"\n" #x" %"#z" ",y)
 
#define print(y, z)   Write( ,y,z)
 
#define nl(x)   fprintf((x),"\n")
 
#define Heading(x, y)   fprintf((x),"\n\n" #y "\n")
 
#define Asterisks(x)   For(i,0,72)fprintf(x,"*")
 
#define c(i)   putchar(i)
 
#define w(x)   fprintf(results,#x)
 
#define pf(x)   printf("%8.5g",x)
 
#define pd(x)   printf("%ld",x)
 
#define Readtext(stream, x)   fgets(x,400,stream); x[strlen(x)-1] = '\0'
 
#define Readtab(x)   fscanf(in,"%[^\t]%*c",x);
 
#define Skip(stream)   fgets(dummy,400,stream)
 
#define Read(stream, x, y)   {fscanf(stream,"%"#y, &x);Skip(stream);}
 
#define endfile(x)   if(feof(x)) break
 
#define pause(x)   {printf("\nPaused: " x); fgetchar();}
 
#define IN   fscanf(in,
 
#define OUT   fprintf(out,
 
#define DIAG   fprintf(diag,
 
#define SCREEN   fprintf(stdout,
 
#define RESULTS   fprintf(results,
 
#define END   );
 
#define sign(x, y)   (fabs(x) * fabs(y)/y)
 
#define Sign(x)   (x > 0. ? 1. : -1.)
 
#define iff(x, y)   if(strcmp(x,#y)==0)
 
#define Screenfull(x, y)   if((x) % ((y)+1) == (y)) pause
 
#define pi   3.14159265358979324
 
#define twopi   6.2831853071795864769
 
#define max(a, b)   (((a) > (b)) ? (a) : (b))
 
#define min(a, b)   (((a) < (b)) ? (a) : (b))
 

Functions

int * ivector (long, long)
 
int ** imatrix (long, long, long, long)
 
char * cvector (long, long)
 
char ** cmatrix (long, long, long, long)
 
float * vector (long, long)
 
float ** matrix (long, long, long, long)
 
unsigned long * lvector (long, long)
 
double * dvector (long, long)
 
double ** dmatrix (long, long, long, long)
 
void free_ivector (int *, long, long)
 
void free_dvector (double *, long, long)
 
void free_lvector (unsigned long *, long, long)
 
void free_dmatrix (double **, long, long, long, long)
 

Macro Definition Documentation

◆ ANSI

#define ANSI

Definition at line 2 of file jf.h.

◆ Asterisks

#define Asterisks (   x)    For(i,0,72)fprintf(x,"*")

Definition at line 20 of file jf.h.

◆ c

#define c (   i)    putchar(i)

Definition at line 21 of file jf.h.

◆ D

#define D (   x,
 
)    printf(" "#x":%"#y, x)

Definition at line 9 of file jf.h.

◆ Diag

#define Diag (   x,
 
)    if(diagon=='y') {fprintf(diag,"\n" #x"\t%"#y"\t", x); fflush(diag);}

Definition at line 10 of file jf.h.

◆ DIAG

#define DIAG   fprintf(diag,

Definition at line 38 of file jf.h.

◆ Diag_Maple

#define Diag_Maple (   x,
 
)    fprintf(diag,"\n\# "#x" = %"#y";", x);

Definition at line 11 of file jf.h.

◆ END

#define END   );

Definition at line 42 of file jf.h.

◆ endfile

#define endfile (   x)    if(feof(x)) break

Definition at line 32 of file jf.h.

◆ For

#define For (   x,
  y,
  z 
)    for((x)=(y);(x)<=(z);(x)++)

Definition at line 12 of file jf.h.

◆ Heading

#define Heading (   x,
 
)    fprintf((x),"\n\n" #y "\n")

Definition at line 18 of file jf.h.

◆ iff

#define iff (   x,
 
)    if(strcmp(x,#y)==0)

Definition at line 47 of file jf.h.

◆ IN

#define IN   fscanf(in,

Definition at line 36 of file jf.h.

◆ max

#define max (   a,
 
)    (((a) > (b)) ? (a) : (b))

Definition at line 70 of file jf.h.

◆ min

#define min (   a,
 
)    (((a) < (b)) ? (a) : (b))

Definition at line 71 of file jf.h.

◆ nl

#define nl (   x)    fprintf((x),"\n")

Definition at line 17 of file jf.h.

◆ OUT

#define OUT   fprintf(out,

Definition at line 37 of file jf.h.

◆ pause

#define pause (   x)    {printf("\nPaused: " x); fgetchar();}

Definition at line 34 of file jf.h.

◆ pd

#define pd (   x)    printf("%ld",x)

Definition at line 24 of file jf.h.

◆ pf

#define pf (   x)    printf("%8.5g",x)

Definition at line 23 of file jf.h.

◆ pi

#define pi   3.14159265358979324

Definition at line 50 of file jf.h.

◆ print

#define print (   y,
  z 
)    Write( ,y,z)

Definition at line 15 of file jf.h.

◆ Read

#define Read (   stream,
  x,
 
)    {fscanf(stream,"%"#y, &x);Skip(stream);}

Definition at line 30 of file jf.h.

◆ Readtab

#define Readtab (   x)    fscanf(in,"%[^\t]%*c",x);

Definition at line 27 of file jf.h.

◆ Readtext

#define Readtext (   stream,
 
)    fgets(x,400,stream); x[strlen(x)-1] = '\0'

Definition at line 26 of file jf.h.

◆ RESULTS

#define RESULTS   fprintf(results,

Definition at line 40 of file jf.h.

◆ SCREEN

#define SCREEN   fprintf(stdout,

Definition at line 39 of file jf.h.

◆ Screenfull

#define Screenfull (   x,
 
)    if((x) % ((y)+1) == (y)) pause

Definition at line 48 of file jf.h.

◆ Sign

#define Sign (   x)    (x > 0. ? 1. : -1.)

Definition at line 45 of file jf.h.

◆ sign

#define sign (   x,
 
)    (fabs(x) * fabs(y)/y)

Definition at line 44 of file jf.h.

◆ Skip

#define Skip (   stream)    fgets(dummy,400,stream)

Definition at line 29 of file jf.h.

◆ twopi

#define twopi   6.2831853071795864769

Definition at line 51 of file jf.h.

◆ w

#define w (   x)    fprintf(results,#x)

Definition at line 22 of file jf.h.

◆ Write

#define Write (   x,
  y,
  z 
)    fprintf(out,"\n" #x" %"#z" ",y)

Definition at line 14 of file jf.h.

Function Documentation

◆ cmatrix()

char ** cmatrix ( long  ,
long  ,
long  ,
long   
)

◆ cvector()

char * cvector ( long  ,
long   
)

◆ dmatrix()

double** dmatrix ( long  ,
long  ,
long  ,
long   
)

Definition at line 16 of file Util.cpp.

◆ dvector()

double* dvector ( long  ,
long   
)

Definition at line 7 of file Util.cpp.

◆ free_dmatrix()

void free_dmatrix ( double **  ,
long  ,
long  ,
long  ,
long   
)

Definition at line 44 of file Util.cpp.

◆ free_dvector()

void free_dvector ( double *  ,
long  ,
long   
)

Definition at line 38 of file Util.cpp.

◆ free_ivector()

void free_ivector ( int *  ,
long  ,
long   
)

◆ free_lvector()

void free_lvector ( unsigned long *  ,
long  ,
long   
)

◆ imatrix()

int ** imatrix ( long  ,
long  ,
long  ,
long   
)

◆ ivector()

int* ivector ( long  ,
long   
)

◆ lvector()

unsigned long* lvector ( long  ,
long   
)

◆ matrix()

float** matrix ( long  ,
long  ,
long  ,
long   
)

◆ vector()

float* vector ( long  ,
long   
)