summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2008-01-13 22:42:36 +0000
committerKarl Berry <karl@freefriends.org>2008-01-13 22:42:36 +0000
commit72a8586805bfdecad5305807e1dad56cbee24156 (patch)
tree7075b2523ce45501766b6e3ba5154c6bb086f23e /Build
parent5c22279bea757066e928d8dbe5f628e89a4f9d20 (diff)
remove stub remote.c-no
git-svn-id: svn://tug.org/texlive/trunk@6221 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/kpathsea/ChangeLog2
-rw-r--r--Build/source/texk/kpathsea/remote.c-no92
2 files changed, 2 insertions, 92 deletions
diff --git a/Build/source/texk/kpathsea/ChangeLog b/Build/source/texk/kpathsea/ChangeLog
index e4d0715ade5..116cbae073b 100644
--- a/Build/source/texk/kpathsea/ChangeLog
+++ b/Build/source/texk/kpathsea/ChangeLog
@@ -1,5 +1,7 @@
2008-01-13 Karl Berry <karl@tug.org>
+ * remote.c-no: remove this stub. Suggestion from Martin.
+
* mktexpk: use $MT_MKTEXDIR in the error message if making
PKDESTDIR fails, instead of hardwiring mktexdir.
From Javier, 7 Jan 2008 11:33:18.
diff --git a/Build/source/texk/kpathsea/remote.c-no b/Build/source/texk/kpathsea/remote.c-no
deleted file mode 100644
index 65a967e5680..00000000000
--- a/Build/source/texk/kpathsea/remote.c-no
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- Handling of remote files with kpathsea.
-*/
-
-#include <kpathsea/config.h>
-#include <kpathsea/c-pathch.h>
-#include <kpathsea/hash.h>
-#include <geturl.h>
-
-hash_table_type *remote_db;
-
-static char *log_buffer;
-int index;
-
-void __cdecl DoDownloadProgress(unsigned long partial, unsigned long total)
-{
- sprintf(log_buffer+index," -> %8ld/%8ld\r", partial, total);
- fputs(log_buffer, stdout);
-}
-
-void __cdecl DoDownloadLog(char *s, ...)
-{
-#if 0
- va_list argList;
- fputc('\n', stderr);
- va_start (argList, s);
- vfprintf(stderr, s, argList);
- va_end (argList);
-#endif
-}
-
-string get_remote_file(const_string filename)
-{
- string *lookup = NULL;
- string localname = NULL;
- boolean ret;
-
- if ((remote_db = hash_exists_p(hashtable_remote)) == NULL) {
- remote_db = hash_create (1007, hashtable_remote);
- }
-
- lookup = hash_lookup(remote_db, filename);
- /* Either the file has already been downloaded */
- if (lookup && *lookup) {
- return *lookup;
- }
- /* Or it is a new one */
- /* Get some local name */
- localname =_tempnam(getenv("TMP"), "kpse");
- if (localname == NULL) return localname;
-
- index = strlen(filename);
- log_buffer = xmalloc(index + 24);
- strcpy(log_buffer, filename);
-
- ret = (get_url_to_file(filename,
- localname,
- 0,
- DoDownloadLog,
- DoDownloadProgress,
- NULL, /* AfxGetInstanceHandle() */
- NetIOIE5, /*g_uiNetMethod */
- NULL, /* _proxy_address */
- 80 /* g_uiProxyPort */
- ) == 0);
-
- if (ret)
- hash_insert(remote_db, filename, localname);
- else
- localname = NULL;
-
- puts("\n");
- free(log_buffer);
- return localname;
-}
-
-void CDECL unlink_remote_file(const_string key, const_string value)
-{
- int fa;
- fa = GetFileAttributes(value);
- if (fa != 0xFFFFFFFF && !(fa & FILE_ATTRIBUTE_DIRECTORY)) {
- if (DeleteFile(value) == 0) {
- fprintf(stderr, "%s: can't delete file %s (error %d)\n", kpse_program_name, value, GetLastError());
- }
- }
-}
-
-void cleanup_remote_files()
-{
- hash_table_type *remote = hash_exists_p(hashtable_remote);
- hash_iter(remote, unlink_remote_file);
-}