~ubuntu-branches/ubuntu/precise/wget/precise-proposed

« back to all changes in this revision

Viewing changes to src/utils.h

  • Committer: Bazaar Package Importer
  • Author(s): Noèl Köthe
  • Date: 2005-06-26 16:46:25 UTC
  • mfrom: (1.1.1 upstream) (2.1.1 sarge)
  • Revision ID: james.westby@ubuntu.com-20050626164625-jjcde8hyztx7xq7o
Tags: 1.10-2
* wget-fix_error--save-headers patch from upstream
  (closes: Bug#314728)
* don't pattern-match server redirects patch from upstream
  (closes: Bug#163243)
* correct de.po typos
  (closes: Bug#313883)
* wget-E_html_behind_file_counting fix problem with adding the
  numbers after the html extension
* updated Standards-Version: to 3.6.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* Declarations for utils.c.
2
 
   Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
 
2
   Copyright (C) 2005 Free Software Foundation, Inc.
3
3
 
4
4
This file is part of GNU Wget.
5
5
 
34
34
   ALLABS = 1
35
35
};
36
36
 
37
 
/* A linked list of strings.  The list is ordered alphabetically.  */
38
 
typedef struct _slist
39
 
{
40
 
  char *string;
41
 
  struct _slist *next;
42
 
} slist;
43
 
 
44
37
struct hash_table;
45
38
 
46
39
struct file_memory {
49
42
  int mmap_p;
50
43
};
51
44
 
52
 
struct wget_timer;
 
45
#define HYPHENP(x) (*(x) == '-' && !*((x) + 1))
53
46
 
54
47
char *time_str PARAMS ((time_t *));
55
48
char *datetime_str PARAMS ((time_t *));
59
52
#endif
60
53
 
61
54
char *xstrdup_lower PARAMS ((const char *));
62
 
int count_char PARAMS ((const char *, char));
63
55
 
64
56
char *strdupdelim PARAMS ((const char *, const char *));
65
57
char **sepstring PARAMS ((const char *));
66
58
int frontcmp PARAMS ((const char *, const char *));
67
 
char *pwd_cuserid PARAMS ((char *));
68
59
void fork_to_background PARAMS ((void));
69
60
 
 
61
#ifdef WGET_USE_STDARG
 
62
char *aprintf PARAMS ((const char *, ...))
 
63
     GCC_FORMAT_ATTR (1, 2);
 
64
char *concat_strings PARAMS ((const char *, ...));
 
65
#else  /* not WGET_USE_STDARG */
 
66
char *aprintf ();
 
67
char *concat_strings ();
 
68
#endif /* not WGET_USE_STDARG */
 
69
 
70
70
void touch PARAMS ((const char *, time_t));
71
71
int remove_link PARAMS ((const char *));
72
72
int file_exists_p PARAMS ((const char *));
73
73
int file_non_directory_p PARAMS ((const char *));
74
 
long file_size PARAMS ((const char *));
 
74
wgint file_size PARAMS ((const char *));
75
75
int make_directory PARAMS ((const char *));
76
76
char *unique_name PARAMS ((const char *, int));
 
77
FILE *unique_create PARAMS ((const char *, int, char **));
 
78
FILE *fopen_excl PARAMS ((const char *, int));
77
79
char *file_merge PARAMS ((const char *, const char *));
78
80
 
79
81
int acceptable PARAMS ((const char *));
90
92
 
91
93
void free_vec PARAMS ((char **));
92
94
char **merge_vecs PARAMS ((char **, char **));
93
 
slist *slist_append PARAMS ((slist *, const char *));
94
 
slist *slist_prepend PARAMS ((slist *, const char *));
95
 
slist *slist_nreverse PARAMS ((slist *));
96
 
int slist_contains PARAMS ((slist *, const char *));
97
 
void slist_free PARAMS ((slist *));
 
95
char **vec_append PARAMS ((char **, const char *));
98
96
 
99
97
void string_set_add PARAMS ((struct hash_table *, const char *));
100
98
int string_set_contains PARAMS ((struct hash_table *, const char *));
 
99
void string_set_to_array PARAMS ((struct hash_table *, char **));
101
100
void string_set_free PARAMS ((struct hash_table *));
102
101
void free_keys_and_values PARAMS ((struct hash_table *));
103
102
 
104
 
char *legible PARAMS ((long));
105
 
char *legible_large_int PARAMS ((LARGE_INT));
106
 
int numdigit PARAMS ((long));
107
 
char *number_to_string PARAMS ((char *, long));
108
 
 
109
 
struct wget_timer *wtimer_allocate PARAMS ((void));
110
 
struct wget_timer *wtimer_new PARAMS ((void));
111
 
void wtimer_delete PARAMS ((struct wget_timer *));
112
 
void wtimer_reset PARAMS ((struct wget_timer *));
113
 
double wtimer_elapsed PARAMS ((struct wget_timer *));
114
 
double wtimer_granularity PARAMS ((void));
115
 
 
116
 
char *html_quote_string PARAMS ((const char *));
 
103
char *with_thousand_seps PARAMS ((wgint));
 
104
char *with_thousand_seps_large PARAMS ((LARGE_INT));
 
105
char *human_readable PARAMS ((wgint));
 
106
int numdigit PARAMS ((wgint));
 
107
char *number_to_string PARAMS ((char *, wgint));
 
108
char *number_to_static_string PARAMS ((wgint));
117
109
 
118
110
int determine_screen_width PARAMS ((void));
119
111
int random_number PARAMS ((int));
120
112
double random_float PARAMS ((void));
121
113
 
122
114
int run_with_timeout PARAMS ((double, void (*) (void *), void *));
 
115
void xsleep PARAMS ((double));
 
116
 
 
117
/* How many bytes it will take to store LEN bytes in base64.  */
 
118
#define BASE64_LENGTH(len) (4 * (((len) + 2) / 3))
 
119
 
 
120
int base64_encode PARAMS ((const char *, int, char *));
 
121
int base64_decode PARAMS ((const char *, char *));
 
122
 
 
123
void stable_sort PARAMS ((void *, size_t, size_t,
 
124
                          int (*) (const void *, const void *)));
123
125
 
124
126
#endif /* UTILS_H */