Changeset 60590
- Timestamp:
- May 29, 2014, 3:23:24 PM (10 years ago)
- Location:
- grass/trunk
- Files:
-
- 2 edited
-
include/defs/gis.h (modified) (2 diffs)
-
lib/gis/error.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
grass/trunk/include/defs/gis.h
r60515 r60590 61 61 #include <stdarg.h> 62 62 #include <stdio.h> 63 #include <setjmp.h> 63 64 #include <sys/types.h> 64 65 #include <sys/stat.h> … … 218 219 219 220 /* error.c */ 221 jmp_buf *G_fatal_longjmp(int); 220 222 int G_info_format(void); 221 223 void G_message(const char *, ...) __attribute__ ((format(printf, 1, 2))); -
grass/trunk/lib/gis/error.c
r60289 r60590 15 15 #include <stdlib.h> 16 16 #include <string.h> 17 #include <setjmp.h> 17 18 #include <unistd.h> 18 19 #include <time.h> … … 58 59 static void log_error(const char *, int); 59 60 61 static int fatal_longjmp; 62 static jmp_buf fatal_jmp_buf; 63 64 jmp_buf *G_fatal_longjmp(int enable) 65 { 66 fatal_longjmp = enable; 67 return &fatal_jmp_buf; 68 } 69 60 70 static void vfprint_error(int type, const char *template, va_list ap) 61 71 { … … 157 167 vfprint_error(ERR, msg, ap); 158 168 va_end(ap); 169 } 170 171 if (fatal_longjmp) { 172 busy = 0; 173 longjmp(fatal_jmp_buf, 1); 159 174 } 160 175
Note:
See TracChangeset
for help on using the changeset viewer.
