📄 convert
字号:
RISC OS Conversion log======================mkversion.c~~~~~~~~~~~The RISC OS command-line does not allow the direct creation of the version.hfile in the proper manner. To remedy this in such a way that the versionheader is made at compiletime, I wrote this small program. It is fullyportable, so should work quite happily for any other platform that might needit.msg3states.c~~~~~~~~~~~~Needed getopt.c from the port folder, then compiled and worked fine.tiff.h~~~~~~====1====The symbol _MIPS_SZLONG, if not defined, causes a compiler error. Fixed byensuring it does exist. This looks to me like this wouldn't be anAcorn-specific problem. The new code fragment is as follows:#ifndef _MIPS_SZLONG#define _MIPS_SZLONG 32#endif#if defined(__alpha) || _MIPS_SZLONG == 64tiffcomp.h~~~~~~~~~~====1====#if !defined(__MWERKS__) && !defined(THINK_C)#include <sys/types.h>#endifAcorn also doesn't have this header so:#if !defined(__MWERKS__) && !defined(THINK_C) && !defined(__acorn)#include <sys/types.h>#endif====2====#ifdef VMS#include <file.h>#include <unixio.h>#else#include <fcntl.h>#endifThis seems to indicate that fcntl.h is included on all systems exceptVMS. Odd, because I've never heard of it before. Sure it's in the ANSIdefinition? Anyway, following change:#ifdef VMS#include <file.h>#include <unixio.h>#else#ifndef __acorn#include <fcntl.h>#endif#endifThis will probably change when I find out what it wants from fcntl.h!====3====#if defined(__MWERKS__) || defined(THINK_C) || defined(applec)#include <stdlib.h>#define BSDTYPES#endifAdded RISC OS to above thus:#if defined(__MWERKS__) || defined(THINK_C) || defined(applec) || defined(__acorn)#include <stdlib.h>#define BSDTYPES#endif====4====/* * The library uses the ANSI C/POSIX SEEK_* * definitions that should be defined in unistd.h * (except on VMS where they are in stdio.h and * there is no unistd.h). */#ifndef SEEK_SET#if !defined(VMS) && !defined (applec) && !defined(THINK_C) && !defined(__MWERKS__)#include <unistd.h>#endifRISC OS is like VMS and Mac in this regard. So changed to:/* * The library uses the ANSI C/POSIX SEEK_* * definitions that should be defined in unistd.h * (except on VMS or the Mac or RISC OS, where they are in stdio.h and * there is no unistd.h). */#ifndef SEEK_SET#if !defined(VMS) && !defined (applec) && !defined(THINK_C) && !defined(__MWERKS__) && !defined(__acorn)#include <unistd.h>#endif#endif====5====NB: HAVE_IEEEFP is defined in tiffconf.h, not tiffcomp.h as mentionedin libtiff.README. (Note written on original port from 3.4beta004)Acorn C/C++ claims to accord with IEEE 754, so no change (yet) totiffconf.h.====6====Unsure about whether this compiler supports inline functions. Willleave it on for the time being and see if it works! (Likely ifeverything else does.)... Seems to be OK ...====7====Added to the end:/* * osfcn.h is part of C++Lib on Acorn C/C++, and as such can't be used * on C alone. For that reason, the relevant functions have been * implemented by myself in tif_acorn.c, and the elements from the header * included here. */#ifdef __acorn#ifdef __cplusplus#include <osfcn.h>#else#include "kernel.h"#define O_RDONLY 0#define O_WRONLY 1#define O_RDWR 2#define O_APPEND 8#define O_CREAT 0x200#define O_TRUNC 0x400typedef long off_t;extern int open(const char *name, int flags, int mode);extern int close(int fd);extern int write(int fd, const char *buf, int nbytes);extern int read(int fd, char *buf, int nbytes);extern off_t lseek(int fd, off_t offset, int whence);#endif#endif===============================================================================tif_acorn.c~~~~~~~~~~~Created file tif_acorn.c, copied initially from tif_unix.cDocumented internally where necessary.Note that I have implemented the low-level file-handling functions normallyfound in osfcn.h in here, and put the header info at the bottom oftiffcomp.h. This is further documented from a RISC OS perspective inside thefile.===============================================================================
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -