Imported Upstream version 2.7.1

This commit is contained in:
Laurent Bigonville 2013-11-24 16:00:12 +01:00
parent a1fa151fc7
commit 0121794af9
451 changed files with 41339 additions and 10887 deletions

View file

@ -3,7 +3,7 @@
*
* Copyright (C) 1999 Russell Kroll <rkroll@exploits.org>
* (C) 2000 Nigel Metheringham <Nigel.Metheringham@Intechnology.co.uk>
* (C) 2011 Michal Soltys <soltys@ziu.info>
* (C) 2011+ Michal Soltys <soltys@ziu.info>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -25,7 +25,7 @@
#include "main.h"
#define APC_TABLE_VERSION "version 3.0"
#define APC_TABLE_VERSION "version 3.1"
/* common flags */
@ -43,11 +43,14 @@
#define APC_ENUM 0x00000400 /* enumerated type variable */
#define APC_STRING 0x00000800 /* string variable */
#define APC_MULTI 0x00001000 /* there're other vars like that */
#define APC_DEPR 0x00002000 /* deprecated variable */
#define APC_PACK 0x00002000 /* packed variable */
#define APC_PACK_MAX 4 /* max count of subfields in packed var */
/* variables' format */
#define APC_F_MASK 0xFF000000 /* Mask for apc data formats */
#define APC_F_LEAVE 0x00000000 /* Just pass this through */
#define APC_F_PERCENT 0x01000000 /* Data in a percent format */
#define APC_F_VOLT 0x02000000 /* Data in a voltage format */
#define APC_F_AMP 0x03000000 /* Data in a current/amp format */
@ -57,13 +60,13 @@
#define APC_F_SECONDS 0x07000000 /* Time in seconds */
#define APC_F_MINUTES 0x08000000 /* Time in minutes */
#define APC_F_HOURS 0x09000000 /* Time in hours */
#define APC_F_REASON 0x10000000 /* Reason of transfer */
#define APC_F_LEAVE 0x00000000 /* Just pass this through */
#define APC_F_REASON 0x0A000000 /* Reason of transfer */
/* instant commands */
#define APC_CMD_CUSTOM 0 /* command uses separate function */
#define APC_CMD_OFF 'Z'
#define APC_CMD_ON '\016' /* ^N */
#define APC_CMD_ON '\016' /* ^N */
#define APC_CMD_FPTEST 'A'
#define APC_CMD_SIMPWF 'U'
#define APC_CMD_BTESTTOGGLE 'W'
@ -78,6 +81,9 @@ typedef struct {
const char *name; /* the variable name */
char cmd; /* variable character */
unsigned int flags; /* various flags */
const char *regex; /* variable must match this regex */
size_t nlen0; /* var name + null len */
int cnt; /* curr. count of subs */
} apc_vartab_t;
typedef struct {