#include <h/tws.h>
#include <h/mime.h>
#include <h/mhparse.h>
-#include <h/mhcachesbr.h>
#include <h/utils.h>
#ifdef HAVE_SYS_TIME_H
{ "verbose", 0 },
#define NVERBSW 11
{ "noverbose", 0 },
-#define RCACHESW 12
- { "rcache policy", 0 },
-#define WCACHESW 13
- { "wcache policy", 0 },
-#define CONTENTIDSW 14
+#define CONTENTIDSW 12
{ "contentid", 0 },
-#define NCONTENTIDSW 15
+#define NCONTENTIDSW 13
{ "nocontentid", 0 },
-#define VERSIONSW 16
+#define VERSIONSW 14
{ "version", 0 },
-#define HELPSW 17
+#define HELPSW 15
{ "help", 0 },
-#define DEBUGSW 18
+#define DEBUGSW 16
{ "debug", -5 },
{ NULL, 0 }
};
int make_intermediates(char *);
void content_error(char *, CT, char *, ...);
-/* mhcachesbr.c */
-int find_cache(CT, int, int *, char *, char *, int);
-
/* ftpsbr.c */
int ftp_get(char *, char *, char *, char *, char *, char *, int, int);
static CT build_mime(char *);
-
-/* mhcachesbr.c */
-extern int rcachesw;
-extern int wcachesw;
-extern char *cache_public;
-extern char *cache_private;
-
int debugsw = 0;
int verbosw = 0;
main(int argc, char **argv)
{
int sizesw = 1, headsw = 1;
- int *icachesw;
char *cp, buf[BUFSIZ];
char buffer[BUFSIZ], *compfile = NULL;
char **argp, **arguments;
print_version(invo_name);
done(1);
- case RCACHESW:
- icachesw = &rcachesw;
- goto do_cache;
- case WCACHESW:
- icachesw = &wcachesw;
- do_cache: ;
- if (!(cp = *argp++) || *cp == '-')
- adios(NULL, "missing argument to %s",
- argp[-2]);
- switch (*icachesw = smatch(cp, caches)) {
- case AMBIGSW:
- ambigsw(cp, caches);
- done(1);
- case UNKWNSW:
- adios(NULL, "%s unknown", cp);
- default:
- break;
- }
- continue;
-
case EBCDICSW:
ebcdicsw++;
continue;
fclose(fp);
}
- /* Check for public cache location */
- if ((cache_public = context_find(nmhcache)) && *cache_public != '/')
- cache_public = NULL;
-
- /* Check for private cache location */
- if (!(cache_private = context_find(nmhprivcache)))
- cache_private = ".cache";
- cache_private = getcpy(toabsdir(cache_private));
-
/*
** Check for storage directory. If defined, we
** will store temporary files there. Else we