|
|
52eab63 |
diff --git a/src/rc/access.c b/src/rc/access.c
|
|
|
52eab63 |
index 59f0ef7..27a52dc 100644
|
|
|
52eab63 |
--- a/src/rc/access.c
|
|
|
52eab63 |
+++ b/src/rc/access.c
|
|
|
52eab63 |
@@ -202,7 +202,7 @@ decode_member_header(RcArchive rca, RcMember mbr)
|
|
|
52eab63 |
memset(mbr, 0, sizeof(*mbr));
|
|
|
52eab63 |
|
|
|
52eab63 |
while( html_fd_next_tag(rca->fd, tag, properties) )
|
|
|
52eab63 |
- { if ( strcasecmp(tag, "file") == 0 )
|
|
|
52eab63 |
+ { if ( strmp(tag, "file") == 0 )
|
|
|
52eab63 |
{ html_decode_tag(properties, make_file_tag_def(), mbr);
|
|
|
52eab63 |
|
|
|
52eab63 |
if ( mbr->name )
|
|
|
52eab63 |
@@ -279,7 +279,7 @@ find_archive_dimensions(RcArchive rca)
|
|
|
52eab63 |
{ const char *data = rca->data;
|
|
|
52eab63 |
size_t alen = strlen(ARCHIVE_TAG);
|
|
|
52eab63 |
|
|
|
52eab63 |
- if ( strncasecmp(data, ARCHIVE_TAG, alen) != 0 )
|
|
|
52eab63 |
+ if ( strncmp(data, ARCHIVE_TAG, alen) != 0 )
|
|
|
52eab63 |
{ const char *rc_end = &data[rca->size];
|
|
|
52eab63 |
const char *end = rc_end-1;
|
|
|
52eab63 |
const char *s;
|
|
|
52eab63 |
@@ -298,7 +298,7 @@ find_archive_dimensions(RcArchive rca)
|
|
|
52eab63 |
{ const char *start = end - len;
|
|
|
52eab63 |
rc_size hdrlen = start - (const char *)rca->map_start;
|
|
|
52eab63 |
|
|
|
52eab63 |
- if ( strncasecmp(start, ARCHIVE_TAG, alen) == 0 )
|
|
|
52eab63 |
+ if ( strncmp(start, ARCHIVE_TAG, alen) == 0 )
|
|
|
52eab63 |
{ rca->data = (void *)start;
|
|
|
52eab63 |
rca->size -= hdrlen;
|
|
|
52eab63 |
|
|
|
52eab63 |
@@ -327,7 +327,7 @@ at_archive_start(RcArchive rca)
|
|
|
52eab63 |
return FALSE;
|
|
|
52eab63 |
}
|
|
|
52eab63 |
|
|
|
52eab63 |
- if ( strncasecmp(buf, atag, alen) == 0 )
|
|
|
52eab63 |
+ if ( strncmp(buf, atag, alen) == 0 )
|
|
|
52eab63 |
return TRUE; /* fine, this is the start */
|
|
|
52eab63 |
|
|
|
52eab63 |
rc_errno = RCE_NOERROR;
|
|
|
52eab63 |
diff --git a/src/rc/build.c b/src/rc/build.c
|
|
|
52eab63 |
index 6e148c3..670f1b3 100644
|
|
|
52eab63 |
--- a/src/rc/build.c
|
|
|
52eab63 |
+++ b/src/rc/build.c
|
|
|
52eab63 |
@@ -3,9 +3,9 @@
|
|
|
52eab63 |
Part of SWI-Prolog
|
|
|
52eab63 |
|
|
|
52eab63 |
Author: Jan Wielemaker
|
|
|
52eab63 |
- E-mail: jan@swi.psy.uva.nl
|
|
|
52eab63 |
+ E-mail: J.Wielemaker@science.uva.nl
|
|
|
52eab63 |
WWW: http://www.swi-prolog.org
|
|
|
52eab63 |
- Copyright (C): 1985-2002, University of Amsterdam
|
|
|
52eab63 |
+ Copyright (C): 1985-2008, University of Amsterdam
|
|
|
52eab63 |
|
|
|
52eab63 |
This library is free software; you can redistribute it and/or
|
|
|
52eab63 |
modify it under the terms of the GNU Lesser General Public
|
|
|
52eab63 |
@@ -176,16 +176,16 @@ rc_save_data(RcMember m, FILE *fd)
|
|
|
52eab63 |
|
|
|
52eab63 |
static int
|
|
|
52eab63 |
rc_save_member(RcMember m, FILE *fd)
|
|
|
52eab63 |
-{ fprintf(fd, "\n
|
|
|
52eab63 |
+{ fprintf(fd, "\n
|
|
|
52eab63 |
m->name, m->rc_class, m->encoding, (long)m->size);
|
|
|
52eab63 |
if ( m->modified )
|
|
|
52eab63 |
- fprintf(fd, " MODIFIED=%ld", (long)m->modified);
|
|
|
52eab63 |
+ fprintf(fd, " modified=%ld", (long)m->modified);
|
|
|
52eab63 |
fprintf(fd, ">\n");
|
|
|
52eab63 |
|
|
|
52eab63 |
if ( !rc_save_data(m, fd) )
|
|
|
52eab63 |
return FALSE;
|
|
|
52eab63 |
|
|
|
52eab63 |
- fprintf(fd, "\n</FILE>\n");
|
|
|
52eab63 |
+ fprintf(fd, "\n</file>\n");
|
|
|
52eab63 |
|
|
|
52eab63 |
return TRUE;
|
|
|
52eab63 |
}
|
|
|
52eab63 |
@@ -212,7 +212,7 @@ rc_save_archive(RcArchive rca, const char *to)
|
|
|
52eab63 |
hdrlen = hdr->size;
|
|
|
52eab63 |
}
|
|
|
52eab63 |
|
|
|
52eab63 |
- fprintf(fd, "<ARCHIVE>\n");
|
|
|
52eab63 |
+ fprintf(fd, "<archive>\n");
|
|
|
52eab63 |
for( member = rca->members; member; member = member->next )
|
|
|
52eab63 |
{ if ( strcmp(member->name, "$header") == 0 &&
|
|
|
52eab63 |
strcmp(member->rc_class, "$rc") == 0 )
|
|
|
52eab63 |
@@ -223,9 +223,9 @@ rc_save_archive(RcArchive rca, const char *to)
|
|
|
52eab63 |
return FALSE;
|
|
|
52eab63 |
}
|
|
|
52eab63 |
}
|
|
|
52eab63 |
- fprintf(fd, "</ARCHIVE>\n");
|
|
|
52eab63 |
+ fprintf(fd, "</archive>\n");
|
|
|
52eab63 |
size = ftell(fd) - hdrlen;
|
|
|
52eab63 |
- fprintf(fd, "<FOOT CONTENTLENGTH=%ld>\n", (long)size);
|
|
|
52eab63 |
+ fprintf(fd, "<foot contentlength=%ld>\n", (long)size);
|
|
|
52eab63 |
if ( fclose(fd) == EOF )
|
|
|
52eab63 |
{ rc_errno = RCE_ERRNO;
|
|
|
52eab63 |
return FALSE;
|
|
|
52eab63 |
diff --git a/src/rc/html.c b/src/rc/html.c
|
|
|
52eab63 |
index 29996a4..fb03f0f 100644
|
|
|
52eab63 |
--- a/src/rc/html.c
|
|
|
52eab63 |
+++ b/src/rc/html.c
|
|
|
52eab63 |
@@ -34,11 +34,6 @@
|
|
|
52eab63 |
#include "html.h"
|
|
|
52eab63 |
#include <stdlib.h>
|
|
|
52eab63 |
|
|
|
52eab63 |
-#if !defined(strncasecmp) && !defined(HAVE_STRCASECMP) && defined(HAVE_STRICMP)
|
|
|
52eab63 |
-#define strcasecmp stricmp
|
|
|
52eab63 |
-#define strncasecmp strnicmp
|
|
|
52eab63 |
-#endif
|
|
|
52eab63 |
-
|
|
|
52eab63 |
#ifndef EOS
|
|
|
52eab63 |
#define EOS '\0'
|
|
|
52eab63 |
#endif
|
|
|
52eab63 |
@@ -76,7 +71,7 @@ html_find_tag(const char *data, const char *end, const char *tag)
|
|
|
52eab63 |
if ( data == end )
|
|
|
52eab63 |
return NULL;
|
|
|
52eab63 |
|
|
|
52eab63 |
- if ( strncasecmp(data+1, tag, len) == 0 )
|
|
|
52eab63 |
+ if ( strncmp(data+1, tag, len) == 0 )
|
|
|
52eab63 |
{ int c = data[len+1];
|
|
|
52eab63 |
|
|
|
52eab63 |
if ( isspace(c) || c == '>' )
|
|
|
52eab63 |
@@ -95,7 +90,7 @@ html_find_close_tag(const char *data, const char *tag)
|
|
|
52eab63 |
while(data)
|
|
|
52eab63 |
{ if ( (data = strchr(data, '<')) &&
|
|
|
52eab63 |
data[1] == '/' &&
|
|
|
52eab63 |
- strncasecmp(data+2, tag, len) == 0 &&
|
|
|
52eab63 |
+ strncmp(data+2, tag, len) == 0 &&
|
|
|
52eab63 |
data[len+2] == '>' )
|
|
|
52eab63 |
return (char *)data+len+3;
|
|
|
52eab63 |
if ( data )
|
|
|
52eab63 |
@@ -240,7 +235,7 @@ html_decode_tag(const char *data, HtmlTagDef spec, void *dest)
|
|
|
52eab63 |
}
|
|
|
52eab63 |
|
|
|
52eab63 |
for(d=spec; d->tag; d++)
|
|
|
52eab63 |
- { if ( strncasecmp(si, d->tag, ei-si) == 0 )
|
|
|
52eab63 |
+ { if ( strncmp(si, d->tag, ei-si) == 0 )
|
|
|
52eab63 |
{ void *dst = (char *)dest + d->offset;
|
|
|
52eab63 |
|
|
|
52eab63 |
(*d->convert)(sv, ev-sv, dst, d->closure);
|
|
|
52eab63 |
|