#include "geoslib_enum.h"
#include "geoslib_old_f.h"
#include "geoslib_f_private.h"
#include "Enum/EJustify.hpp"
#include "Basic/Utilities.hpp"
#include "Basic/File.hpp"
#include "Basic/String.hpp"
#include "Basic/OptDbg.hpp"
#include "Basic/OptCst.hpp"
#include <string.h>
#include <stdarg.h>
#include <math.h>
Functions | |
void | redefine_message (void(*write_func)(const char *)) |
void | redefine_error (void(*warn_func)(const char *)) |
void | redefine_read (void(*read_func)(const char *, char *)) |
void | redefine_exit (void(*exit_func)(void)) |
void | string_strip_blanks (char *string, int flag_lead) |
void | string_strip_quotes (char *string) |
void | message_extern (const char *string) |
void | exit_extern () |
void | mem_error (int nbyte) |
FILE * | _file_open (const char *filename, int mode) |
void | _file_delimitors (char del_com, char del_sep, char del_blk) |
void | print_current_line (void) |
int | _file_read (FILE *file, const char *format, va_list ap) |
int | _file_get_ncol (FILE *file) |
void | _erase_current_string (void) |
int | _buffer_read (char **buffer, const char *format, va_list ap) |
void | _file_write (FILE *file, const char *format, va_list ap) |
void | _buffer_write (char *buffer, const char *format, va_list ap) |
void | _lire_string (const char *question, int flag_def, const char *valdef, char *answer) |
int | _lire_int (const char *question, int flag_def, int valdef, int valmin, int valmax) |
double | _lire_double (const char *question, int flag_def, double valdef, double valmin, double valmax) |
int | _lire_logical (const char *question, int flag_def, int valdef) |
void | record_close (void) |
int | _record_read (FILE *file, const char *format,...) |
void | print_range (const char *title, int ntab, const double *tab, const double *sel) |
int _buffer_read | ( | char ** | buffer, |
const char * | format, | ||
va_list | ap | ||
) |
Read the next token from the buffer
[in] | buffer | Buffer to be read |
[in] | format | format |
[out] | ap | va_list containing the read variables |
This method is not documented on purpose. It should remain private
void _buffer_write | ( | char * | buffer, |
const char * | format, | ||
va_list | ap | ||
) |
Write the next token into the buffer
[in] | buffer | Writing buffer |
[in] | format | Encoding format |
[in] | ap | va_list to be written |
This method is not documented on purpose. It should remain private
void _erase_current_string | ( | void | ) |
Erase the current decoding string
This method is not documented on purpose. It should remain private
void _file_delimitors | ( | char | del_com, |
char | del_sep, | ||
char | del_blk | ||
) |
Define the file delimitors
[in] | del_com | Delimitor for comments |
[in] | del_sep | Delimitor for separator |
[in] | del_blk | Delimitor for blank |
This method is not documented on purpose. It should remain private
int _file_get_ncol | ( | FILE * | file | ) |
Get the number of tokens in the line
[in] | file | FILE structure |
This method is not documented on purpose. It should remain private
FILE* _file_open | ( | const char * | filename, |
int | mode | ||
) |
Open an ASCII file
[in] | filename | Local file name |
[in] | mode | type of file (OLD or NEW) |
This method is not documented on purpose. It should remain private
int _file_read | ( | FILE * | file, |
const char * | format, | ||
va_list | ap | ||
) |
Read the next token from the file
[in] | file | FILE structure |
[in] | format | format |
[in] | ap | Value to be read |
This method is not documented on purpose. It should remain private
void _file_write | ( | FILE * | file, |
const char * | format, | ||
va_list | ap | ||
) |
Write the next token from the file
[in] | file | FILE structure |
[in] | format | Encoding format |
[in] | ap | Value to be written |
This method is not documented on purpose. It should remain private
double _lire_double | ( | const char * | question, |
int | flag_def, | ||
double | valdef, | ||
double | valmin, | ||
double | valmax | ||
) |
Read a double value
[in] | question | Question to be asked |
[in] | flag_def | 1 if the default is authorized; 0 otherwise |
[in] | valdef | Default value or TEST |
[in] | valmin | Minimum authorized value or TEST |
[in] | valmax | Maximum authorized value or TEST |
This method is not documented on purpose. It should remain private
int _lire_int | ( | const char * | question, |
int | flag_def, | ||
int | valdef, | ||
int | valmin, | ||
int | valmax | ||
) |
Read an integer value
[in] | question | Question to be asked |
[in] | flag_def | 1 if the default is authorized; 0 otherwise |
[in] | valdef | Default value or ITEST |
[in] | valmin | Minimum authorized value or ITEST |
[in] | valmax | Maximum authorized value or ITEST |
This method is not documented on purpose. It should remain private
int _lire_logical | ( | const char * | question, |
int | flag_def, | ||
int | valdef | ||
) |
Read a boolean answer
[in] | question | Question to be asked |
[in] | flag_def | 1 if the default is authorized; 0 otherwise |
[in] | valdef | Default value (0 for NO and 1 for YES) |
This method is not documented on purpose. It should remain private
void _lire_string | ( | const char * | question, |
int | flag_def, | ||
const char * | valdef, | ||
char * | answer | ||
) |
Read astring
[in] | question | Question to be asked |
[in] | flag_def | 1 if the default is authorized; 0 otherwise |
[in] | valdef | Default string |
[out] | answer | Answering string |
This method is not documented on purpose. It should remain private
int _record_read | ( | FILE * | file, |
const char * | format, | ||
... | |||
) |
Read the next record
[in] | file | Pointer to the file to be read |
[in] | format | Encoding format |
[in] | ... | Value to be written |
This method is not documented on purpose. It should remain private
void exit_extern | ( | ) |
External function to provoke an exit of API This call comes from AStringable where initial mes_abort() has been moved
void mem_error | ( | int | nbyte | ) |
Problem in memory allocation
[in] | nbyte | number of bytes to be allocated |
void message_extern | ( | const char * | string | ) |
Print a message This call comes from AStringable where initial message() has been moved
[in] | string | String to be displayed |
void print_current_line | ( | void | ) |
Print the current line read from an ASCII file
void print_range | ( | const char * | title, |
int | ntab, | ||
const double * | tab, | ||
const double * | sel | ||
) |
Print the range of values in an array
[in] | title | optional title (NULL if not defined) |
[in] | ntab | number of values |
[in] | tab | array of values |
[in] | sel | (optional) selection |
void record_close | ( | void | ) |
Read the next record
This method is not documented on purpose. It should remain private
void redefine_error | ( | void(*)(const char *) | warn_func | ) |
Redefine the IO routine for printing error message
[in] | warn_func | Warning function |
void redefine_exit | ( | void(*)(void) | exit_func | ) |
Redefine the exiting routine
[in] | exit_func | Exiting function |
void redefine_message | ( | void(*)(const char *) | write_func | ) |
Redefine the IO routine for printing message
[in] | write_func | Writing function |
void redefine_read | ( | void(*)(const char *, char *) | read_func | ) |
Redefine the IO routine for Reading
[in] | read_func | Reading function |
void string_strip_blanks | ( | char * | string, |
int | flag_lead | ||
) |
Strip the blanks from a string
[in,out] | string | String to be cleaned |
[in] | flag_lead | 1 to strip only the leading blanks |
void string_strip_quotes | ( | char * | string | ) |
Strip the leading and trailing quotes from a string
[in,out] | string | String to be cleaned |