~ubuntu-branches/ubuntu/saucy/dosfstools/saucy-proposed

« back to all changes in this revision

Viewing changes to src/common.h

  • Committer: Package Import Robot
  • Author(s): Steve Langasek
  • Date: 2011-12-19 15:25:47 UTC
  • mfrom: (4.1.8 sid)
  • Revision ID: package-import@ubuntu.com-20111219152547-ynwswo9ubk6l6szm
Tags: 3.0.12-1ubuntu1
* Merge from Debian testing, remaining changes:
  - debian/patches/02_fat32_label.patch: resolve an error thrown by
    dosfslabel when trying to label.
* Dropped changes, superseded in Debian:
  - build-depend on quilt: Debian is source format 3.0 (quilt).
  - debian/patches/01_fix_sector_count.patch: included upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
   can be found in /usr/share/common-licenses/GPL-3 file.
20
20
*/
21
21
 
22
 
# include <asm/types.h>
 
22
#include <asm/types.h>
23
23
 
24
24
#ifndef _COMMON_H
25
25
#define _COMMON_H
26
26
 
27
 
void die(char *msg,...) __attribute((noreturn));
 
27
void die(char *msg, ...) __attribute((noreturn));
28
28
 
29
29
/* Displays a prinf-style message and terminates the program. */
30
30
 
31
 
void pdie(char *msg,...) __attribute((noreturn));
 
31
void pdie(char *msg, ...) __attribute((noreturn));
32
32
 
33
33
/* Like die, but appends an error message according to the state of errno. */
34
34
 
37
37
/* mallocs SIZE bytes and returns a pointer to the data. Terminates the program
38
38
   if malloc fails. */
39
39
 
40
 
void *qalloc(void **root,int size);
 
40
void *qalloc(void **root, int size);
41
41
 
42
42
/* Like alloc, but registers the data area in a list described by ROOT. */
43
43
 
45
45
 
46
46
/* Deallocates all qalloc'ed data areas described by ROOT. */
47
47
 
48
 
int min(int a,int b);
 
48
int min(int a, int b);
49
49
 
50
50
/* Returns the smaller integer value of a and b. */
51
51
 
52
 
char get_key(char *valid,char *prompt);
 
52
char get_key(char *valid, char *prompt);
53
53
 
54
54
/* Displays PROMPT and waits for user input. Only characters in VALID are
55
55
   accepted. Terminates the program on EOF. Returns the character. */