#define -> static const int. Also got rid of some big static buffers.

This commit is contained in:
Mark Whitley
2001-01-23 22:30:04 +00:00
parent 2b8d07c590
commit 59ab025363
74 changed files with 670 additions and 620 deletions

View File

@@ -12,8 +12,8 @@
#include <sys/ioctl.h>
/* From <linux/vt.h> */
#define VT_ACTIVATE 0x5606 /* make vt active */
#define VT_WAITACTIVE 0x5607 /* wait for vt active */
static const int VT_ACTIVATE = 0x5606; /* make vt active */
static const int VT_WAITACTIVE = 0x5607; /* wait for vt active */
int chvt_main(int argc, char **argv)
{

View File

@@ -11,7 +11,7 @@
#include <sys/ioctl.h>
/* From <linux/vt.h> */
#define VT_DISALLOCATE 0x5608 /* free memory associated to vt */
static const int VT_DISALLOCATE = 0x5608; /* free memory associated to vt */
int deallocvt_main(int argc, char *argv[])
{

View File

@@ -32,11 +32,11 @@ struct kbentry {
unsigned char kb_index;
unsigned short kb_value;
};
#define KDGKBENT 0x4B46 /* gets one entry in translation table */
static const int KDGKBENT = 0x4B46; /* gets one entry in translation table */
/* From <linux/keyboard.h> */
#define NR_KEYS 128
#define MAX_NR_KEYMAPS 256
static const int NR_KEYS = 128;
static const int MAX_NR_KEYMAPS = 256;
int dumpkmap_main(int argc, char **argv)
{

View File

@@ -21,13 +21,13 @@
#include <sys/kd.h>
#include <endian.h>
#define PSF_MAGIC1 0x36
#define PSF_MAGIC2 0x04
static const int PSF_MAGIC1 = 0x36;
static const int PSF_MAGIC2 = 0x04;
#define PSF_MODE512 0x01
#define PSF_MODEHASTAB 0x02
#define PSF_MAXMODE 0x03
#define PSF_SEPARATOR 0xFFFF
static const int PSF_MODE512 = 0x01;
static const int PSF_MODEHASTAB = 0x02;
static const int PSF_MAXMODE = 0x03;
static const int PSF_SEPARATOR = 0xFFFF;
struct psf_header {
unsigned char magic1, magic2; /* Magic number */

View File

@@ -34,11 +34,11 @@ struct kbentry {
unsigned char kb_index;
unsigned short kb_value;
};
#define KDSKBENT 0x4B47 /* sets one entry in translation table */
static const int KDSKBENT = 0x4B47; /* sets one entry in translation table */
/* From <linux/keyboard.h> */
#define NR_KEYS 128
#define MAX_NR_KEYMAPS 256
static const int NR_KEYS = 128;
static const int MAX_NR_KEYMAPS = 256;
int loadkmap_main(int argc, char **argv)
{

View File

@@ -33,7 +33,7 @@
struct kbkeycode {
unsigned int scancode, keycode;
};
#define KDSETKEYCODE 0x4B4D /* write kernel keycode table entry */
static const int KDSETKEYCODE = 0x4B4D; /* write kernel keycode table entry */
extern int
setkeycodes_main(int argc, char** argv)