mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
cleaned up RISC OS code and removed lots of unnecessary stuff
This commit is contained in:
parent
0f346cf8c1
commit
02ae08d6ef
23 changed files with 197 additions and 156 deletions
|
@ -1,3 +1,11 @@
|
|||
2003-12-28 Stefan Bellon <sbellon@sbellon.de>
|
||||
|
||||
* riscos.c [__riscos__]: Better filetype handling (use a
|
||||
different SWI) and removal of unnecessary function.
|
||||
|
||||
* memory.c (out_of_core) [__riscos__]: Produce stack backtrace on
|
||||
RISC OS if out_of_core() is called and M_GUARD is compiled in.
|
||||
|
||||
2003-12-06 David Shaw <dshaw@jabberwocky.com>
|
||||
|
||||
* http.c (send_request): Add a Host: header for virtual hosts.
|
||||
|
|
|
@ -406,6 +406,9 @@ out_of_core(size_t n, int secure)
|
|||
log_info ("(this may be caused by too many secret keys used "
|
||||
"simultaneously or due to excessive large key sizes)\n");
|
||||
}
|
||||
#if defined(M_GUARD) && defined(__riscos__)
|
||||
abort();
|
||||
#endif
|
||||
exit (2);
|
||||
}
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
|
||||
#include <config.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <signal.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
|
@ -32,11 +33,18 @@
|
|||
#include "util.h"
|
||||
#include "memory.h"
|
||||
|
||||
#include <unixlib/local.h> /* needed for RISCOSIFY_NO_PROCESS */
|
||||
#define __UNIXLIB_INTERNALS
|
||||
#include <unixlib/swiparams.h> /* needed for MMM_TYPE_* definitions */
|
||||
#undef __UNIXLIB_INTERNALS
|
||||
|
||||
|
||||
/* static symbols that trigger UnixLib behaviour */
|
||||
|
||||
int __riscosify_control = __RISCOSIFY_NO_PROCESS;
|
||||
int __feature_imagefs_is_file = 1;
|
||||
|
||||
|
||||
/* RISC OS file open descriptor control list */
|
||||
|
||||
struct fds_item {
|
||||
|
@ -69,13 +77,6 @@ is_read_only(const char *filename)
|
|||
|
||||
/* exported RISC OS functions */
|
||||
|
||||
void
|
||||
riscos_global_defaults(void)
|
||||
{
|
||||
__riscosify_control = __RISCOSIFY_NO_PROCESS;
|
||||
__feature_imagefs_is_file = 1;
|
||||
}
|
||||
|
||||
int
|
||||
riscos_load_module(const char *name, const char * const path[], int fatal)
|
||||
{
|
||||
|
@ -118,10 +119,13 @@ riscos_get_filetype(const char *filename)
|
|||
{
|
||||
int result;
|
||||
|
||||
if (_swix(OS_File, _INR(0,1) | _OUT(6), 23, filename, &result))
|
||||
if (_swix(OS_File, _INR(0,1) | _OUT(2), 17, filename, &result))
|
||||
log_fatal("Can't get filetype for file \"%s\"!\n", filename);
|
||||
|
||||
return result;
|
||||
if ((result & 0xfff00000) == 0xfff00000)
|
||||
return (result & 0xfff00) >> 8;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -307,18 +311,21 @@ riscos_gstrans(const char *old)
|
|||
char *
|
||||
riscos_make_basename(const char *filepath, const char *realfname)
|
||||
{
|
||||
char *result, *p = (char*)filepath-1;
|
||||
char *result, *p;
|
||||
int i, filetype;
|
||||
|
||||
if ( !(p=strrchr(filepath, DIRSEP_C)) )
|
||||
if ( !(p=strrchr(filepath, ':')) )
|
||||
;
|
||||
if ( (p = strrchr(filepath, DIRSEP_C)) )
|
||||
p++;
|
||||
else if ( (p = strrchr(filepath, ':')) )
|
||||
p++;
|
||||
else
|
||||
p = (char*) filepath;
|
||||
|
||||
i = strlen(p+1);
|
||||
i = strlen(p);
|
||||
result = m_alloc(i + 5);
|
||||
if (!result)
|
||||
log_fatal("Can't claim memory for riscos_make_basename() buffer!\n");
|
||||
strcpy(result, p+1);
|
||||
strcpy(result, p);
|
||||
|
||||
filetype = riscos_get_filetype( realfname );
|
||||
result[i++] = ',';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue