global.h

00001 #ifndef IVERGLOBAL
00002 #define IVERGLOBAL
00003 //  _____ _       _           _ 
00004 // / ____| |     | |         | |
00005 //| |  __| | ___ | |__   __ _| |
00006 //| | |_ | |/ _ \| '_ \ / _` | |
00007 //| |__| | | (_) | |_) | (_| | |
00008 // \_____|_|\___/|_.__/ \__,_|_|
00009 //
00010 #include <math.h>
00011 #include <stdio.h>
00012 
00013 #define TABLESIZE 2000
00014 #define PI 3.14159265359
00015 
00016 int Round(double Val);
00017 
00018 int inline min(int a, int b)
00019         {
00020                 return (a < b) ? a : b;
00021         }
00022 int inline max(int a, int b)
00023         {
00024                 return (a > b) ? a : b;
00025         }
00026 
00027 void inline SkipBlanks(FILE* F)
00028 {
00029         char NextChar;
00030         fpos_t SavePos;
00031         do {
00032                         fgetpos(F,&SavePos);
00033                         NextChar = fgetc (F);
00034                 } while ((NextChar == ' ')||(NextChar == '\n'));
00035         fsetpos(F,&SavePos);
00036 }
00037 void inline SkipCommentLines(FILE* F)
00038 {
00039         char LineFirstChar;
00040         char NextChar;
00041         SkipBlanks(F);
00042         fpos_t SavePos;
00043 
00044         fgetpos(F,&SavePos);
00045         LineFirstChar = fgetc (F);
00046         // skip comment lines
00047         while (LineFirstChar == '#')
00048         {
00049                 do {
00050                         NextChar = fgetc (F);
00051                 } while (NextChar != '\n');
00052                 SkipBlanks(F);
00053                 fgetpos(F,&SavePos);
00054                 LineFirstChar=fgetc(F);
00055         }
00056         fsetpos(F,&SavePos);
00057 }
00058 #endif

Generated on Thu Sep 28 09:43:42 2006 by  doxygen 1.4.7