File: base.h

package info (click to toggle)
ncps 0.510-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 172 kB
  • ctags: 133
  • sloc: ansic: 1,838; makefile: 63
file content (86 lines) | stat: -rw-r--r-- 1,413 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <curses.h>
#include <fcntl.h>
#include <math.h>
#include <malloc.h>

#include <stdio.h>
#include <stdlib.h>

#include <signal.h>
#include <dirent.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/user.h>
#include <sys/time.h>
#include <pwd.h>
#include <asm/param.h>
#include <term.h>


#include <proc/readproc.h>
#include <proc/sysinfo.h>
#include <proc/devname.h>

#define DEBUG 0

#define V_MAJOR 0
#define V_MINOR 51
#define V_PATCH ""

#define TTYC 6

#define START_ROW 0
#define START_COL 0
#define ROW_SPACE 1
#define COL_SPACE 8
#define MAX_ROW LINES - 2 * ROW_SPACE - START_ROW

typedef struct procinfo_s {
    struct procinfo_s *next;
    int uid;
    /*  char uname[10]; */

    proc_t *proc;
    char *pname;
    char *s_pname;

    char ttyc[TTYC];
    unsigned long pmem;
    int expand;
    int num_child;
    int is_selected;
    
} procinfo_t;

typedef struct tree_s {
    pid_t pid;
    int row;
    int col;
    int num_child;
    struct tree_s *parent;
    struct tree_s **children;
} tree;

/*  int t_row; */

typedef struct killer_s {
  
  int count;
  int t_count;
  int monitoring;
  /*  int user_count; */
  int uid; /*User ID */
  tree *ptree;

  procinfo_t *pidlist; 
  procinfo_t *trunk;
  struct killer_s *son;
  struct killer_s *mother;
} killer_t;

extern killer_t killer;
int t_view;