GRASS Programmer's Manual
6.4.2(2012)
Main Page
Related Pages
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
lib/datetime/error.c
Go to the documentation of this file.
1
/*
2
* Copyright (C) 1995. Bill Brown <brown@gis.uiuc.edu> & Michael Shapiro
3
*
4
* This program is free software under the GPL (>=v2)
5
* Read the file GPL.TXT coming with GRASS for details.
6
*/
7
#include <string.h>
8
9
10
static
int
err_code = 0;
11
static
char
err_msg[1024];
12
13
30
int
datetime_error
(
int
code,
char
*
msg
)
31
{
32
err_code = code;
33
*err_msg = 0;
34
if
(code != 0 && msg)
35
strcpy(err_msg, msg);
/* hope err_msg is big enough */
36
37
return
code;
38
}
39
48
int
datetime_error_code
(
void
)
49
{
50
return
err_code;
51
}
52
61
char
*
datetime_error_msg
(
void
)
62
{
63
return
err_msg;
64
}
65
66
75
void
datetime_clear_error
(
void
)
76
{
77
err_code = 0;
78
*err_msg = 0;
79
}
lib
datetime
error.c
Generated on Sun Sep 9 2012 18:55:31 for GRASS Programmer's Manual by
1.8.1.2