33 G_debug(3,
"Vect_hist_command()");
48 sprintf(buf,
"LOCATION: %s MAPSET: %s USER: %s DATE: %s\n",
69 G_debug(5,
"Vect_hist_write(): %s", str);
72 ret = fprintf(Map->
hist_fp,
"%s", str);
116 G_debug(3,
"Vect_hist_rewind()");
136 G_debug(3,
"Vect_hist_copy()");
151 while ((red = fread(buf,
sizeof(
char),
sizeof(
char) * 1000, In->
hist_fp))) {
152 if (!(ret = fwrite(buf,
sizeof(
char), red, Out->
hist_fp))) {
160 if (fread(buf,
sizeof(
char),
sizeof(
char), In->
hist_fp) != 1) {
164 if (buf[0] !=
'\n') {
170 "---------------------------------------------------------------------------------\n");
int G_getl2(char *, int, FILE *)
Gets a line of text from a file of any pedigree.
const char * G_whoami(void)
Gets user's name.
const char * G_gisdbase(void)
Get name of top level database directory.
void Vect_hist_rewind(struct Map_info *Map)
Rewind history file.
int Vect_hist_command(struct Map_info *Map)
Write command info to history file.
char * G_recreate_command(void)
Creates command to run non-interactive.
const char * G_location(void)
Get current location name.
void G_fseek(FILE *, off_t, int)
Change the file position of the stream.
int Vect_hist_copy(const struct Map_info *In, struct Map_info *Out)
Copy history from one map to another.
off_t G_ftell(FILE *)
Get the current file position of the stream.
char * Vect_hist_read(char *s, int size, const struct Map_info *Map)
Reads one line from history file without newline character.
const char * G_mapset(void)
Get current mapset name.
int Vect_hist_write(struct Map_info *Map, const char *str)
Write string to history file.
int G_debug(int, const char *,...) __attribute__((format(printf
const char * G_date(void)
Current date and time.
FILE * hist_fp
History file.