File: br_cmd_engine.h

package info (click to toggle)
bottlerocket 0.05b3-17
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 404 kB
  • sloc: ansic: 1,837; sh: 170; makefile: 105; tcl: 92
file content (51 lines) | stat: -rw-r--r-- 1,889 bytes parent folder | download | duplicates (9)
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
#ifndef _CMD_HANDLING_H
#define _CMD_HANDLING_H

#define CMD_BLKSIZE 64   /* How many commands should we allocate space for at a time? */
#define UNIT_BLKSIZE 5    /*  How many units in a command allocated at a time */

typedef struct {
    int numunits;
    int allocatedunits;
    int *devs;
    int *houses;
} br_unit_list;

typedef struct {
    int inverse;
    int repeat;
    int numcmds;
    int allocatedcmds;
    br_unit_list **units;
    int *cmds;
} br_control_info;

int br_inverse_cmd(int /* command */);
int br_set_fd(br_control_info *, int /* file descriptor */);
int br_execute(int fd, br_control_info *);
br_unit_list *br_new_unit_list();
int br_free_unit_list(br_unit_list *);
int br_add_unit(br_unit_list *, int /* house */, int /* house */);
int br_del_unit(br_unit_list *, int /* house */, int /* device */);
int br_malloc_cmds(br_control_info *, int /* number of commands */);
int br_realloc_cmds(br_control_info *, int /* number of commands */);
int br_free_cmds(br_control_info *);
int br_add_ul_cmd(br_control_info *, int /* command */,
               br_unit_list * /* units */);
int br_add_cmd(br_control_info *, int /* command */, int /* house */,
               int /* device */);
int br_del_cmd(br_control_info *, int /* command index */);
br_control_info *br_new_control_info();
int br_free_control_info(br_control_info *);
int br_strtoul(char * /* dlptr */, br_unit_list * /* units */, char ** /* endptr */);
int br_ulcat(br_unit_list * /* units a */, br_unit_list * /* units b */);
br_unit_list *br_uldup(br_unit_list * /* units */);
int br_strtohc(char * /* hcptr */, char ** /* endptr */);
int br_get_num_commands(br_control_info *);
int br_get_ul_device(br_unit_list * /* units */, int /* index */);
int br_get_ul_house(br_unit_list * /* units */, int /* index */);
int br_get_num_units(br_unit_list * /* units */);

extern int br_default_house;

#endif