~ubuntu-core-dev/module-init-tools/ubuntu

« back to all changes in this revision

Viewing changes to util.h

  • Committer: Scott James Remnant
  • Date: 2009-07-16 15:24:17 UTC
  • mfrom: (152.1.38)
  • Revision ID: scott@netsplit.com-20090716152417-7ak1sklxb59cs4fz
MergeĀ 3.10

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
 
4
4
#include <stdio.h>
5
5
 
 
6
struct string_table
 
7
{
 
8
        unsigned int cnt;
 
9
        unsigned int max;
 
10
        const char *str[0];
 
11
};
 
12
 
6
13
char *getline_wrapped(FILE *file, unsigned int *linenum);
7
14
 
8
15
void filename2modname(char *modname, const char *filename);
9
16
char *underscores(char *string);
10
17
char *my_basename(const char *path);
11
18
 
 
19
struct string_table *strtbl_add(const char *str, struct string_table *tbl);
 
20
void strtbl_free(struct string_table *tbl);
 
21
 
12
22
const char *next_string(const char *string, unsigned long *secsize);
13
23
 
14
24
/*
31
41
 
32
42
int native_endianness(void);
33
43
 
34
 
int elf_ident(void *file, unsigned long fsize, int *conv);
35
 
void *get_section(void *file, unsigned long filesize,
36
 
        const char *secname, unsigned long *secsize);
37
 
void *get_section32(void *file, unsigned long filesize,
38
 
        const char *secname, unsigned long *secsize, int conv);
39
 
void *get_section64(void *file, unsigned long filesize,
40
 
        const char *secname, unsigned long *secsize, int conv);
41
 
 
42
44
#define streq(a,b) (strcmp((a),(b)) == 0)
43
45
#define strstarts(a,start) (strncmp((a),(start), strlen(start)) == 0)
44
46