]> sjero.net Git - wget/blob - src/utils.h
[svn] Initial revision
[wget] / src / utils.h
1 /* Declarations for utils.c.
2    Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
3
4 This file is part of Wget.
5
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
19
20 #ifndef UTILS_H
21 #define UTILS_H
22
23 /* Flags for slist.  */
24 enum {
25    NOSORT     = 1
26 };
27
28 enum accd {
29    ALLABS = 1
30 };
31
32 /* A linked list of strings.  The list is ordered alphabetically.  */
33 typedef struct _slist
34 {
35   char *string;
36   struct _slist *next;
37 } slist;
38
39 char *time_str PARAMS ((time_t *));
40 const char *uerrmsg PARAMS ((uerr_t));
41
42 char *strdupdelim PARAMS ((const char *, const char *));
43 char **sepstring PARAMS ((const char *));
44 int frontcmp PARAMS ((const char *, const char *));
45 char *pwd_cuserid PARAMS ((char *));
46 void fork_to_background PARAMS ((void));
47 void path_simplify PARAMS ((char *));
48
49 void touch PARAMS ((const char *, time_t));
50 int remove_link PARAMS ((const char *));
51 int file_exists_p PARAMS ((const char *));
52 int file_non_directory_p PARAMS ((const char *));
53 int make_directory PARAMS ((const char *));
54 char *unique_name PARAMS ((const char *));
55
56 int acceptable PARAMS ((const char *));
57 int accdir PARAMS ((const char *s, enum accd));
58 char *suffix PARAMS ((const char *s));
59
60 char *read_whole_line PARAMS ((FILE *));
61 void load_file PARAMS ((FILE *, char **, long *));
62
63 void free_vec PARAMS ((char **));
64 char **merge_vecs PARAMS ((char **, char **));
65 slist *add_slist PARAMS ((slist *, const char *, int));
66 int in_slist PARAMS ((slist *, const char *));
67 void free_slist PARAMS ((slist *));
68
69 char *legible PARAMS ((long));
70 int numdigit PARAMS ((long));
71 void long_to_string PARAMS ((char *, long));
72
73 #endif /* UTILS_H */