From: Fabian Keil Date: Sun, 24 Nov 2013 14:26:16 +0000 (+0000) Subject: Use an enum for JB_ERR_* values so they are available in the debugger X-Git-Tag: v_3_0_22~212 X-Git-Url: http://www.privoxy.org/gitweb/%40user-manual%40%40actions-help-prefix%40HIDE-CONTENT-DISPOSITION?a=commitdiff_plain;h=b6abdaf1cd90c5483793a870860934ad860ac68c;p=privoxy.git Use an enum for JB_ERR_* values so they are available in the debugger --- diff --git a/project.h b/project.h index 8e0e9372..f86bc6f5 100644 --- a/project.h +++ b/project.h @@ -1,7 +1,7 @@ #ifndef PROJECT_H_INCLUDED #define PROJECT_H_INCLUDED /** Version string. */ -#define PROJECT_H_VERSION "$Id: project.h,v 1.199 2013/11/24 14:23:28 fabiankeil Exp $" +#define PROJECT_H_VERSION "$Id: project.h,v 1.200 2013/11/24 14:24:18 fabiankeil Exp $" /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/project.h,v $ @@ -137,16 +137,19 @@ typedef int jb_socket; * A standard error code. This should be JB_ERR_OK or one of the JB_ERR_xxx * series of errors. */ -typedef int jb_err; +enum privoxy_err +{ + JB_ERR_OK = 0, /**< Success, no error */ + JB_ERR_MEMORY = 1, /**< Out of memory */ + JB_ERR_CGI_PARAMS = 2, /**< Missing or corrupt CGI parameters */ + JB_ERR_FILE = 3, /**< Error opening, reading or writing a file */ + JB_ERR_PARSE = 4, /**< Error parsing file */ + JB_ERR_MODIFIED = 5, /**< File has been modified outside of the + CGI actions editor. */ + JB_ERR_COMPRESS = 6 /**< Error on decompression */ +}; -#define JB_ERR_OK 0 /**< Success, no error */ -#define JB_ERR_MEMORY 1 /**< Out of memory */ -#define JB_ERR_CGI_PARAMS 2 /**< Missing or corrupt CGI parameters */ -#define JB_ERR_FILE 3 /**< Error opening, reading or writing a file */ -#define JB_ERR_PARSE 4 /**< Error parsing file */ -#define JB_ERR_MODIFIED 5 /**< File has been modified outside of the - CGI actions editor. */ -#define JB_ERR_COMPRESS 6 /**< Error on decompression */ +typedef enum privoxy_err jb_err; /** * This macro is used to free a pointer that may be NULL.