~ubuntu-branches/ubuntu/precise/libisoburn/precise

« back to all changes in this revision

Viewing changes to xorriso/sfile.h

  • Committer: Bazaar Package Importer
  • Author(s): George Danchev
  • Date: 2011-05-26 16:21:32 UTC
  • mfrom: (9.1.12 sid)
  • Revision ID: james.westby@ubuntu.com-20110526162132-9lzoagfaggnera53
Tags: 1.0.8.pl00-4
* [MA] Improve package descriptions and README.Debian.
* [MA] Migrate to format "3.0 (quilt)" and compatibility 8.
  + debian/control: Drop build-dep on 'cdbs'. Require debhelper (>= 8).
  + debian/rules: Reformulate using 'dh'.
  + debian/libisoburn{1,-dev,-doc}.docs: New files.
  + debian/xorriso.docs: Addition of upstream documents.
* [GD] Make sure doxygen documentaton (doc package) is not built
       when dpkg-buildpackage -B is called (i.e. autobuilders).
* [GD] Move doxygen, graphviz to Build-Depends-Indep.
* [GD] Add missing copyrights for debian packaging.
* [GD] Standards-Version: 3.9.2 (no changes needed).
* [GD] More package description and README.Debian improvements;
       thanks to Tony Mancill <tmancill@debian.org>.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images.
 
3
 
 
4
   Copyright 2007-2010 Thomas Schmitt, <scdbackup@gmx.net>
 
5
 
 
6
   Provided under GPL version 2 or later.
 
7
 
 
8
   This file contains declarations of functions around files and strings.
 
9
*/
 
10
 
 
11
 
 
12
#ifndef Xorriso_pvt_sfile_includeD
 
13
#define Xorriso_pvt_sfile_includeD yes
 
14
 
 
15
#define TSOB_FELD(typ,anz) (typ *) calloc(1, (anz)*sizeof(typ));
 
16
#define Smem_malloC malloc
 
17
#define Smem_freE free
 
18
 
 
19
#define SfileadrL 4096
 
20
 
 
21
 
 
22
int Sfile_str(char target[SfileadrL], char *source, int flag); 
 
23
 
 
24
double Sfile_microtime(int flag);
 
25
  
 
26
int Sfile_add_to_path(char path[SfileadrL], char *addon, int flag);
 
27
  
 
28
int Sfile_scale(double value, char *result, int siz, double thresh, int flag);
 
29
  
 
30
int Sfile_destroy_argv(int *argc, char ***argv, int flag);
 
31
  
 
32
/*
 
33
 bit0= do not ignore trailing slash
 
34
 bit1= do not ignore empty components (other than the empty root name)
 
35
*/
 
36
int Sfile_count_components(char *path, int flag);
 
37
 
 
38
/*
 
39
 @param flag
 
40
 bit0= return -1 if file is missing
 
41
 bit1= return a hardlink with siblings as type 5
 
42
 bit2= evaluate eventual link target rather than the link object itself
 
43
 bit3= return a socket or a char device as types 7 or 8 rather than 0
 
44
 @return
 
45
  0=unknown
 
46
  1=regular
 
47
  2=directory
 
48
  3=symbolic link
 
49
  4=named pipe
 
50
  5=multiple hardlink (with bit1)
 
51
  6=block device
 
52
  7=socket (with bit3)
 
53
  8=character device (with bit3)
 
54
*/
 
55
int Sfile_type(char *filename, int flag);
 
56
 
 
57
/* @param flag bit0= only encode inside quotes
 
58
               bit1= encode < 32 outside quotes except 7, 8, 9, 10, 12, 13
 
59
               bit2= encode in any case above 126
 
60
               bit3= encode in any case shellsafe:
 
61
                     <=42 , 59, 60, 62, 63, 92, 94, 96, >=123
 
62
*/
 
63
int Sfile_bsl_encoder(char **result, char *text, size_t text_len, int flag);
 
64
 
 
65
int Sfile_argv_bsl(int argc, char ***argv, int flag);
 
66
 
 
67
/*
 
68
 bit0= read progname as first argument from line
 
69
 bit1= just release argument list argv and return
 
70
 bit2= abort with return(0) if incomplete quotes are found
 
71
 bit3= eventually prepend missing '-' to first argument read from line
 
72
 bit4= like bit2 but only check quote completeness, do not allocate memory
 
73
 bit5+6= interpretation of backslashes:
 
74
       0= no interpretation, leave unchanged
 
75
       1= only inside double quotes
 
76
       2= outside single quotes
 
77
       3= everywhere
 
78
 bit7= append a NULL element to argv
 
79
*/
 
80
int Sfile_make_argv(char *progname, char *line, int *argc, char ***argv,
 
81
                    int flag);
 
82
 
 
83
/* YYMMDD[.hhmm[ss]] */
 
84
int Sfile_decode_datestr(struct tm *reply, char *text, int flag);
 
85
 
 
86
int Sfile_off_t_text(char text[80], off_t num, int flag);
 
87
 
 
88
int Sfile_leafname(char *path, char leafname[SfileadrL], int flag);
 
89
 
 
90
/* @param flag bit0= do not clip of carriage return at line end
 
91
*/
 
92
char *Sfile_fgets_n(char *line, int maxl, FILE *fp, int flag);
 
93
 
 
94
/*
 
95
 bit0=with hours+minutes
 
96
 bit1=with seconds
 
97
 
 
98
 bit8= local time rather than UTC
 
99
*/
 
100
char *Sfile_datestr(time_t tim, short int flag);
 
101
 
 
102
/* Converts backslash codes into single characters:
 
103
    \a BEL 7 , \b BS 8 , \e ESC 27 , \f FF 12 , \n LF 10 , \r CR 13 ,
 
104
    \t  HT 9 , \v VT 11 , \\ \ 92
 
105
    \[0-9][0-9][0-9] octal code , \x[0-9a-f][0-9a-f] hex code ,
 
106
    \cX control-x (ascii(X)-64)
 
107
   @param upto  maximum number of characters to examine for backslash.
 
108
                The scope of a backslash (0 to 3 characters) is not affected.
 
109
   @param eaten returns the difference in length between input and output
 
110
   @param flag bit0= only determine *eaten, do not convert
 
111
               bit1= allow to convert \000 to binary 0
 
112
*/
 
113
int Sfile_bsl_interpreter(char *text, int upto, int *eaten, int flag);
 
114
 
 
115
int Sfile_prepend_path(char *prefix, char path[SfileadrL], int flag);
 
116
 
 
117
int Sfile_home_adr_s(char *filename, char *fileadr, int fa_size, int flag);
 
118
 
 
119
 
 
120
#endif /* ! Xorriso_pvt_sfile_includeD */
 
121