/* atari.c */ /* Author: * Guntram Blohm * Buchenstrasse 19 * 7904 Erbach, West Germany * Tel. ++49-7305-6997 * sorry - no regular network connection */ /* * This file contains the 'standard' functions which are not supported * by Atari/Mark Williams, and some other TOS-only requirements. */ #include "config.h" #include "vi.h" #if TOS #include /* vi uses mode==0 only ... */ int access(file, mode) char *file; { int fd=Fopen(file, 0); if (fd<0) return -1; Fclose(fd); return 0; } char *mktemp(template) char *template; { return template; } /* read -- text mode, compress \r\n to \n * warning: might fail when maxlen==1 and at eol */ int tread(fd, buf, maxlen) int fd; char *buf; int maxlen; { int i, j, nread=read(fd, buf, (unsigned)maxlen); if (nread && buf[nread-1]=='\r') { nread--; lseek(fd, -1l, 1); } for (i=j=0; j