mirror of
https://codeberg.org/scip/pcp.git
synced 2025-12-17 12:00:56 +01:00
fixed global variables, made them extern in *.h files
This commit is contained in:
@@ -65,9 +65,9 @@ typedef unsigned int qbyte; // Quad byte = 32 bits
|
||||
// sigs
|
||||
#define PCP_SIG_VERSION 2
|
||||
|
||||
char *PCP_ERR;
|
||||
byte PCP_ERRSET;
|
||||
int PCP_EXIT;
|
||||
extern char *PCP_ERR;
|
||||
extern byte PCP_ERRSET;
|
||||
extern int PCP_EXIT;
|
||||
|
||||
//set error
|
||||
void fatal(const char * fmt, ...);
|
||||
|
||||
@@ -25,10 +25,10 @@
|
||||
#include "uthash.h"
|
||||
#include "key.h"
|
||||
|
||||
pcp_key_t *pcpkey_hash;
|
||||
pcp_pubkey_t *pcppubkey_hash;
|
||||
pcp_key_t *__k;
|
||||
pcp_pubkey_t *__p;
|
||||
extern pcp_key_t *pcpkey_hash;
|
||||
extern pcp_pubkey_t *pcppubkey_hash;
|
||||
extern pcp_key_t *__k;
|
||||
extern pcp_pubkey_t *__p;
|
||||
|
||||
// wrapper for HASH_ITER
|
||||
#define pcphash_iterate(key) \
|
||||
|
||||
@@ -29,6 +29,10 @@
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
char *PCP_ERR;
|
||||
byte PCP_ERRSET;
|
||||
int PCP_EXIT;
|
||||
|
||||
void fatal(const char * fmt, ...) {
|
||||
va_list ap;
|
||||
va_start(ap, fmt);
|
||||
|
||||
@@ -22,6 +22,11 @@
|
||||
|
||||
#include "keyhash.h"
|
||||
|
||||
pcp_key_t *pcpkey_hash;
|
||||
pcp_pubkey_t *pcppubkey_hash;
|
||||
pcp_key_t *__k;
|
||||
pcp_pubkey_t *__p;
|
||||
|
||||
void pcphash_init() {
|
||||
pcpkey_hash = NULL;
|
||||
pcppubkey_hash = NULL;
|
||||
|
||||
Reference in New Issue
Block a user