use extern keyword

This commit is contained in:
albert 2002-05-30 07:08:15 +00:00
parent 11c1eba093
commit 195fdc4365
3 changed files with 23 additions and 23 deletions

View File

@ -2,6 +2,6 @@
#define ABBREV_TTY 2 /* remove tty */
#define ABBREV_PTS 4 /* remove pts/ */
int dev_to_tty(char *ret, int chop, int dev, int pid, unsigned int flags);
extern int dev_to_tty(char *ret, int chop, int dev, int pid, unsigned int flags);
int tty_to_dev(char *name);
extern int tty_to_dev(char *name);

View File

@ -9,19 +9,19 @@
/* get page info */
#include <asm/page.h>
void *xrealloc(void *oldp, unsigned int size);
void *xmalloc(unsigned int size);
void *xcalloc(void *pointer, int size);
extern void *xrealloc(void *oldp, unsigned int size);
extern void *xmalloc(unsigned int size);
extern void *xcalloc(void *pointer, int size);
int mult_lvl_cmp(void* a, void* b);
int node_mult_lvl_cmp(void* a, void* b);
extern int mult_lvl_cmp(void* a, void* b);
extern int node_mult_lvl_cmp(void* a, void* b);
char *user_from_uid(uid_t uid);
char *group_from_gid(gid_t gid);
extern char *user_from_uid(uid_t uid);
extern char *group_from_gid(gid_t gid);
const char * wchan(unsigned long address);
int open_psdb(const char *override);
int open_psdb_message(const char *override, void (*message)(const char *, ...));
extern const char * wchan(unsigned long address);
extern int open_psdb(const char *override);
extern int open_psdb_message(const char *override, void (*message)(const char *, ...));
unsigned print_str (FILE* file, char *s, unsigned max);
unsigned print_strlist(FILE* file, char **strs, char* sep, unsigned max);
extern unsigned print_str (FILE* file, char *s, unsigned max);
extern unsigned print_strlist(FILE* file, char **strs, char* sep, unsigned max);

View File

@ -28,7 +28,7 @@
*
* Most of it comes from task_struct in linux/sched.h
*/
typedef struct proc_s {
typedef struct proc_t {
#ifdef SIGNAL_STRING
char
/* Linux 2.1.7x and up have more signals. This handles 88. */
@ -130,7 +130,7 @@ typedef struct proc_s {
#include <sys/types.h>
#include <dirent.h>
#include <unistd.h>
typedef struct {
typedef struct PROCTAB {
DIR* procfs;
int flags;
pid_t* pids; /* pids of the procs */
@ -142,7 +142,7 @@ typedef struct {
/* initialize a PROCTAB structure holding needed call-to-call persistent data
*/
PROCTAB* openproc(int flags, ... /* pid_t*|uid_t*|dev_t*|char* [, int n] */ );
extern PROCTAB* openproc(int flags, ... /* pid_t*|uid_t*|dev_t*|char* [, int n] */ );
/* Convenient wrapper around openproc and readproc to slurp in the whole process
@ -150,22 +150,22 @@ PROCTAB* openproc(int flags, ... /* pid_t*|uid_t*|dev_t*|char* [, int n] */ );
* Free allocated memory with freeproctab(). Access via tab[N]->member. The
* pointer list is NULL terminated.
*/
proc_t** readproctab(int flags, ... /* same as openproc */ );
extern proc_t** readproctab(int flags, ... /* same as openproc */ );
/* clean-up open files, etc from the openproc()
*/
void closeproc(PROCTAB* PT);
extern void closeproc(PROCTAB* PT);
/* retrieve the next process matching the criteria set by the openproc()
*/
proc_t* readproc(PROCTAB* PT, proc_t* return_buf);
proc_t* ps_readproc(PROCTAB* PT, proc_t* return_buf);
extern proc_t* readproc(PROCTAB* PT, proc_t* return_buf);
extern proc_t* ps_readproc(PROCTAB* PT, proc_t* return_buf);
void look_up_our_self(proc_t *p);
extern void look_up_our_self(proc_t *p);
/* deallocate space allocated by readproc
*/
void freeproc(proc_t* p);
extern void freeproc(proc_t* p);
/* openproc/readproctab:
*