better split up of library files "types.h" & "definitions.h"

centralized all printf specifier character definitions
reuse of arginfo handlers
more cleanups
fixed more AMD64 issues
added DEBUG_LEVEL compile flag to exclude DBGn() statements
This commit is contained in:
Martin Willi
2006-10-31 12:27:59 +00:00
parent de8b8a8c44
commit db7ef62494
151 changed files with 1094 additions and 1061 deletions
+4 -6
View File
@@ -24,8 +24,6 @@
#include <stdio.h>
#include <linux/stddef.h>
#include <types.h>
#include "stroke.h"
#include "stroke_keywords.h"
@@ -128,7 +126,7 @@ static int add_connection(char *name,
msg.add_conn.me.cert = NULL;
msg.add_conn.me.ca = NULL;
msg.add_conn.me.sendcert = 1;
msg.add_conn.me.hostaccess = FALSE;
msg.add_conn.me.hostaccess = 0;
msg.add_conn.me.protocol = 0;
msg.add_conn.me.port = 0;
@@ -139,7 +137,7 @@ static int add_connection(char *name,
msg.add_conn.other.cert = NULL;
msg.add_conn.other.ca = NULL;
msg.add_conn.other.sendcert = 1;
msg.add_conn.other.hostaccess = FALSE;
msg.add_conn.other.hostaccess = 0;
msg.add_conn.other.protocol = 0;
msg.add_conn.other.port = 0;
@@ -213,7 +211,7 @@ static int list_flags[] = {
LIST_ALL
};
static int list(stroke_keyword_t kw, bool utc)
static int list(stroke_keyword_t kw, int utc)
{
stroke_msg_t msg;
@@ -373,7 +371,7 @@ int main(int argc, char *argv[])
case STROKE_LIST_CACERTS:
case STROKE_LIST_CRLS:
case STROKE_LIST_ALL:
res = list(token->kw, argc > 2 && streq(argv[2], "--utc"));
res = list(token->kw, argc > 2 && strcmp(argv[2], "--utc") == 0);
break;
case STROKE_REREAD_CACERTS:
case STROKE_REREAD_CRLS:
+3 -3
View File
@@ -82,7 +82,7 @@ struct stroke_end_t {
char *subnet;
int subnet_mask;
int sendcert;
bool hostaccess;
int hostaccess;
u_int8_t protocol;
u_int16_t port;
};
@@ -135,7 +135,7 @@ struct stroke_msg_t {
/* data for STR_ADD_CONN */
struct {
char *name;
bool ikev2;
int ikev2;
int auth_method;
struct {
char *ike;
@@ -164,7 +164,7 @@ struct stroke_msg_t {
/* data for STR_LIST */
struct {
list_flag_t flags;
bool utc;
int utc;
} list;
/* data for STR_REREAD */