From: Fabian Keil Date: Sat, 19 Feb 2011 13:56:55 +0000 (+0000) Subject: Use an enum for the forwarder_type X-Git-Tag: v_3_0_18~324 X-Git-Url: http://www.privoxy.org/gitweb/%40default-cgi%40edit-actions?a=commitdiff_plain;h=f82469cfb4b0267aed0c43f6c50d21d79e4b7288;p=privoxy.git Use an enum for the forwarder_type --- diff --git a/project.h b/project.h index a0513fc6..3f2a08dd 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.160 2010/10/10 09:58:12 fabiankeil Exp $" +#define PROJECT_H_VERSION "$Id: project.h,v 1.161 2011/01/22 12:30:22 fabiankeil Exp $" /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/project.h,v $ @@ -1031,12 +1031,12 @@ struct block_spec #endif /* def FEATURE_TRUST */ - -#define SOCKS_NONE 0 /**< Don't use a SOCKS server */ -#define SOCKS_4 40 /**< original SOCKS 4 protocol */ -#define SOCKS_4A 41 /**< as modified for hosts w/o external DNS */ -#define SOCKS_5 50 /**< as modified for hosts w/o external DNS */ - +enum forwarder_type { + SOCKS_NONE = 0, /**< Don't use a SOCKS server */ + SOCKS_4 = 40, /**< original SOCKS 4 protocol */ + SOCKS_4A = 41, /**< as modified for hosts w/o external DNS */ + SOCKS_5 = 50, /**< as modified for hosts w/o external DNS */ +}; /** * How to forward a connection to a parent proxy. @@ -1047,7 +1047,7 @@ struct forward_spec struct url_spec url[1]; /** Connection type. Must be SOCKS_NONE, SOCKS_4, SOCKS_4A or SOCKS_5. */ - int type; + enum forwarder_type type; /** SOCKS server hostname. Only valid if "type" is SOCKS_4 or SOCKS_4A. */ char *gateway_host;