retire PUBLIC, PRIVATE and FORWARD

This commit is contained in:
Ben Gras
2012-03-25 20:25:53 +02:00
parent 6a73e85ad1
commit 7336a67dfe
603 changed files with 5776 additions and 5779 deletions

View File

@@ -43,7 +43,7 @@ struct hook_entry {
/*===========================================================================*
* map_unmap_keys *
*===========================================================================*/
PUBLIC void map_unmap_fkeys(map)
void map_unmap_fkeys(map)
int map;
{
int fkeys, sfkeys;
@@ -70,7 +70,7 @@ int map;
*===========================================================================*/
#define pressed(k) ((F1<=(k)&&(k)<=F12 && bit_isset(m->FKEY_FKEYS,((k)-F1+1)))\
|| (SF1<=(k) && (k)<=SF12 && bit_isset(m->FKEY_SFKEYS, ((k)-SF1+1))))
PUBLIC int do_fkey_pressed(m)
int do_fkey_pressed(m)
message *m; /* notification message */
{
int s, h;
@@ -95,7 +95,7 @@ message *m; /* notification message */
/*===========================================================================*
* key_name *
*===========================================================================*/
PRIVATE char *key_name(int key)
static char *key_name(int key)
{
static char name[15];
@@ -112,7 +112,7 @@ PRIVATE char *key_name(int key)
/*===========================================================================*
* mapping_dmp *
*===========================================================================*/
PUBLIC void mapping_dmp(void)
void mapping_dmp(void)
{
int h;

View File

@@ -3,9 +3,9 @@
#define LINES 22
PRIVATE struct data_store ds_store[NR_DS_KEYS];
static struct data_store ds_store[NR_DS_KEYS];
PUBLIC void data_store_dmp()
void data_store_dmp()
{
struct data_store *p;
static int prev_i = 0;

View File

@@ -15,13 +15,13 @@
#include "../vfs/dmap.h"
#include <minix/dmap.h>
PUBLIC struct fproc fproc[NR_PROCS];
PUBLIC struct dmap dmap[NR_DEVICES];
struct fproc fproc[NR_PROCS];
struct dmap dmap[NR_DEVICES];
/*===========================================================================*
* fproc_dmp *
*===========================================================================*/
PUBLIC void fproc_dmp()
void fproc_dmp()
{
struct fproc *fp;
int i, n=0;
@@ -59,7 +59,7 @@ PUBLIC void fproc_dmp()
/*===========================================================================*
* dmap_flags *
*===========================================================================*/
PRIVATE char * dmap_flags(int flags)
static char * dmap_flags(int flags)
{
static char fl[10];
strcpy(fl, "-----");
@@ -70,7 +70,7 @@ PRIVATE char * dmap_flags(int flags)
/*===========================================================================*
* dmap_style *
*===========================================================================*/
PRIVATE char * dmap_style(int dev_style)
static char * dmap_style(int dev_style)
{
static char str[16];
switch(dev_style) {
@@ -89,7 +89,7 @@ PRIVATE char * dmap_style(int dev_style)
/*===========================================================================*
* dtab_dmp *
*===========================================================================*/
PUBLIC void dtab_dmp()
void dtab_dmp()
{
int i;

View File

@@ -41,24 +41,24 @@ static int pagelines;
((unsigned) ((((unsigned long) (n) << CLICK_SHIFT) + 512) / 1024))
/* Declare some local dump procedures. */
FORWARD char *proc_name(int proc_nr);
FORWARD char *s_traps_str(int flags);
FORWARD char *s_flags_str(int flags);
FORWARD char *p_rts_flags_str(int flags);
FORWARD char *boot_flags_str(int flags);
static char *proc_name(int proc_nr);
static char *s_traps_str(int flags);
static char *s_flags_str(int flags);
static char *p_rts_flags_str(int flags);
static char *boot_flags_str(int flags);
/* Some global data that is shared among several dumping procedures.
* Note that the process table copy has the same name as in the kernel
* so that most macros and definitions from proc.h also apply here.
*/
PUBLIC struct proc proc[NR_TASKS + NR_PROCS];
PUBLIC struct priv priv[NR_SYS_PROCS];
PUBLIC struct boot_image image[NR_BOOT_PROCS];
struct proc proc[NR_TASKS + NR_PROCS];
struct priv priv[NR_SYS_PROCS];
struct boot_image image[NR_BOOT_PROCS];
/*===========================================================================*
* kmessages_dmp *
*===========================================================================*/
PUBLIC void kmessages_dmp()
void kmessages_dmp()
{
struct kmessages kmess; /* get copy of kernel messages */
char print_buf[_KMESS_BUF_SIZE+1]; /* this one is used to print */
@@ -90,7 +90,7 @@ PUBLIC void kmessages_dmp()
/*===========================================================================*
* monparams_dmp *
*===========================================================================*/
PUBLIC void monparams_dmp()
void monparams_dmp()
{
char val[1024];
char *e;
@@ -117,7 +117,7 @@ PUBLIC void monparams_dmp()
/*===========================================================================*
* irqtab_dmp *
*===========================================================================*/
PUBLIC void irqtab_dmp()
void irqtab_dmp()
{
int i,r;
struct irq_hook irq_hooks[NR_IRQ_HOOKS];
@@ -163,7 +163,7 @@ PUBLIC void irqtab_dmp()
/*===========================================================================*
* boot_flags_str *
*===========================================================================*/
PRIVATE char *boot_flags_str(int flags)
static char *boot_flags_str(int flags)
{
static char str[10];
str[0] = (flags & PROC_FULLVM) ? 'V' : '-';
@@ -175,7 +175,7 @@ PRIVATE char *boot_flags_str(int flags)
/*===========================================================================*
* image_dmp *
*===========================================================================*/
PUBLIC void image_dmp()
void image_dmp()
{
int m, r;
struct boot_image *ip;
@@ -199,7 +199,7 @@ PUBLIC void image_dmp()
/*===========================================================================*
* kenv_dmp *
*===========================================================================*/
PUBLIC void kenv_dmp()
void kenv_dmp()
{
struct kinfo kinfo;
struct machine machine;
@@ -234,7 +234,7 @@ PUBLIC void kenv_dmp()
/*===========================================================================*
* s_flags_str *
*===========================================================================*/
PRIVATE char *s_flags_str(int flags)
static char *s_flags_str(int flags)
{
static char str[10];
str[0] = (flags & PREEMPTIBLE) ? 'P' : '-';
@@ -252,7 +252,7 @@ PRIVATE char *s_flags_str(int flags)
/*===========================================================================*
* s_traps_str *
*===========================================================================*/
PRIVATE char *s_traps_str(int flags)
static char *s_traps_str(int flags)
{
static char str[10];
str[0] = (flags & (1 << SEND)) ? 'S' : '-';
@@ -268,7 +268,7 @@ PRIVATE char *s_traps_str(int flags)
/*===========================================================================*
* privileges_dmp *
*===========================================================================*/
PUBLIC void privileges_dmp()
void privileges_dmp()
{
register struct proc *rp;
static struct proc *oldrp = BEG_PROC_ADDR;
@@ -315,7 +315,7 @@ PUBLIC void privileges_dmp()
/*===========================================================================*
* p_rts_flags_str *
*===========================================================================*/
PRIVATE char *p_rts_flags_str(int flags)
static char *p_rts_flags_str(int flags)
{
static char str[10];
str[0] = (flags & RTS_PROC_STOP) ? 's' : '-';
@@ -334,7 +334,7 @@ PRIVATE char *p_rts_flags_str(int flags)
* proctab_dmp *
*===========================================================================*/
#if (CHIP == INTEL)
PUBLIC void proctab_dmp()
void proctab_dmp()
{
/* Proc table dump */
@@ -371,7 +371,7 @@ PUBLIC void proctab_dmp()
/*===========================================================================*
* procstack_dmp *
*===========================================================================*/
PUBLIC void procstack_dmp()
void procstack_dmp()
{
/* Proc table dump, with stack */
@@ -396,7 +396,7 @@ PUBLIC void procstack_dmp()
/*===========================================================================*
* memmap_dmp *
*===========================================================================*/
PUBLIC void memmap_dmp()
void memmap_dmp()
{
register struct proc *rp;
static struct proc *oldrp = proc;
@@ -428,7 +428,7 @@ PUBLIC void memmap_dmp()
/*===========================================================================*
* proc_name *
*===========================================================================*/
PRIVATE char *proc_name(proc_nr)
static char *proc_name(proc_nr)
int proc_nr;
{
struct proc *p;

View File

@@ -13,12 +13,12 @@
#include <minix/config.h>
#include <minix/type.h>
PUBLIC struct mproc mproc[NR_PROCS];
struct mproc mproc[NR_PROCS];
/*===========================================================================*
* mproc_dmp *
*===========================================================================*/
PRIVATE char *flags_str(int flags)
static char *flags_str(int flags)
{
static char str[14];
str[0] = (flags & WAITING) ? 'W' : '-';
@@ -39,7 +39,7 @@ PRIVATE char *flags_str(int flags)
return str;
}
PUBLIC void mproc_dmp()
void mproc_dmp()
{
struct mproc *mp;
int i, n=0;
@@ -72,7 +72,7 @@ PUBLIC void mproc_dmp()
/*===========================================================================*
* sigaction_dmp *
*===========================================================================*/
PUBLIC void sigaction_dmp()
void sigaction_dmp()
{
struct mproc *mp;
int i, n=0;

View File

@@ -14,15 +14,15 @@
#include "../rs/const.h"
#include "../rs/type.h"
PUBLIC struct rprocpub rprocpub[NR_SYS_PROCS];
PUBLIC struct rproc rproc[NR_SYS_PROCS];
struct rprocpub rprocpub[NR_SYS_PROCS];
struct rproc rproc[NR_SYS_PROCS];
FORWARD char *s_flags_str(int flags, int sys_flags);
static char *s_flags_str(int flags, int sys_flags);
/*===========================================================================*
* rproc_dmp *
*===========================================================================*/
PUBLIC void rproc_dmp()
void rproc_dmp()
{
struct rproc *rp;
struct rprocpub *rpub;
@@ -56,7 +56,7 @@ PUBLIC void rproc_dmp()
}
PRIVATE char *s_flags_str(int flags, int sys_flags)
static char *s_flags_str(int flags, int sys_flags)
{
static char str[10];
str[0] = (flags & RS_ACTIVE) ? 'A' : '-';

View File

@@ -8,7 +8,7 @@
#define LINES 24
PRIVATE void print_region(struct vm_region_info *vri, int *n)
static void print_region(struct vm_region_info *vri, int *n)
{
static int vri_count, vri_prev_set;
static struct vm_region_info vri_prev;
@@ -61,7 +61,7 @@ PRIVATE void print_region(struct vm_region_info *vri, int *n)
(*n)++;
}
PUBLIC void vm_dmp()
void vm_dmp()
{
static struct proc proc[NR_TASKS + NR_PROCS];
static struct vm_region_info vri[LINES];

View File

@@ -11,26 +11,26 @@
#include <minix/endpoint.h>
/* Allocate space for the global variables. */
PRIVATE message m_in; /* the input message itself */
PRIVATE message m_out; /* the output message used for reply */
PRIVATE endpoint_t who_e; /* caller's proc number */
PRIVATE int callnr; /* system call number */
static message m_in; /* the input message itself */
static message m_out; /* the output message used for reply */
static endpoint_t who_e; /* caller's proc number */
static int callnr; /* system call number */
extern int errno; /* error number set by system library */
/* Declare some local functions. */
FORWARD void get_work(void);
FORWARD void reply(int whom, int result);
static void get_work(void);
static void reply(int whom, int result);
/* SEF functions and variables. */
FORWARD void sef_local_startup(void);
FORWARD int sef_cb_init_fresh(int type, sef_init_info_t *info);
FORWARD void sef_cb_signal_handler(int signo);
static void sef_local_startup(void);
static int sef_cb_init_fresh(int type, sef_init_info_t *info);
static void sef_cb_signal_handler(int signo);
/*===========================================================================*
* main *
*===========================================================================*/
PUBLIC int main(int argc, char **argv)
int main(int argc, char **argv)
{
/* This is the main routine of this service. The main loop consists of
* three major activities: getting new work, processing the work, and
@@ -75,7 +75,7 @@ PUBLIC int main(int argc, char **argv)
/*===========================================================================*
* sef_local_startup *
*===========================================================================*/
PRIVATE void sef_local_startup()
static void sef_local_startup()
{
/* Register init callbacks. */
sef_setcb_init_fresh(sef_cb_init_fresh);
@@ -96,7 +96,7 @@ PRIVATE void sef_local_startup()
/*===========================================================================*
* sef_cb_init_fresh *
*===========================================================================*/
PRIVATE int sef_cb_init_fresh(int UNUSED(type), sef_init_info_t *UNUSED(info))
static int sef_cb_init_fresh(int UNUSED(type), sef_init_info_t *UNUSED(info))
{
/* Initialize the information server. */
@@ -109,7 +109,7 @@ PRIVATE int sef_cb_init_fresh(int UNUSED(type), sef_init_info_t *UNUSED(info))
/*===========================================================================*
* sef_cb_signal_handler *
*===========================================================================*/
PRIVATE void sef_cb_signal_handler(int signo)
static void sef_cb_signal_handler(int signo)
{
/* Only check for termination signal, ignore anything else. */
if (signo != SIGTERM) return;
@@ -123,7 +123,7 @@ PRIVATE void sef_cb_signal_handler(int signo)
/*===========================================================================*
* get_work *
*===========================================================================*/
PRIVATE void get_work()
static void get_work()
{
int status = 0;
status = sef_receive(ANY, &m_in); /* this blocks until message arrives */
@@ -136,7 +136,7 @@ PRIVATE void get_work()
/*===========================================================================*
* reply *
*===========================================================================*/
PRIVATE void reply(who, result)
static void reply(who, result)
int who; /* destination */
int result; /* report result to replyee */
{