home *** CD-ROM | disk | FTP | other *** search
- *** /home/bammi/etc/src/perl/arg.h Tue Jun 11 17:38:33 1991
- --- arg.h Sun Oct 6 18:13:16 1991
- ***************
- *** 282,288 ****
- --- 282,292 ----
- #define O_REWINDDIR 263
- #define O_CLOSEDIR 264
- #define O_SYSCALL 265
- + #ifdef atarist
- + #define PERL_O_PIPE 266
- + #else
- #define O_PIPE 266
- + #endif
- #define MAXO 267
-
- #ifndef DOINIT
- *** /home/bammi/etc/src/perl/doio.c Wed Jun 19 11:18:14 1991
- --- doio.c Sun Oct 6 17:18:54 1991
- ***************
- *** 358,364 ****
- }
- #endif
- #ifdef HAS_RENAME
- ! #ifndef MSDOS
- if (rename(oldname,str->str_ptr) < 0) {
- warn("Can't rename %s to %s: %s, skipping file",
- oldname, str->str_ptr, strerror(errno) );
- --- 358,364 ----
- }
- #endif
- #ifdef HAS_RENAME
- ! #ifndef MSDOS_OR_ATARI
- if (rename(oldname,str->str_ptr) < 0) {
- warn("Can't rename %s to %s: %s, skipping file",
- oldname, str->str_ptr, strerror(errno) );
- ***************
- *** 385,391 ****
- #endif
- }
- else {
- ! #ifndef MSDOS
- if (UNLINK(oldname) < 0) {
- warn("Can't rename %s to %s: %s, skipping file",
- oldname, str->str_ptr, strerror(errno) );
- --- 385,391 ----
- #endif
- }
- else {
- ! #ifndef MSDOS_OR_ATARI
- if (UNLINK(oldname) < 0) {
- warn("Can't rename %s to %s: %s, skipping file",
- oldname, str->str_ptr, strerror(errno) );
- ***************
- *** 671,677 ****
- }
- else {
- retval = (int)str_gnum(argstr);
- ! #ifdef MSDOS
- s = (char*)(long)retval; /* ouch */
- #else
- s = (char*)retval; /* ouch */
- --- 671,677 ----
- }
- else {
- retval = (int)str_gnum(argstr);
- ! #ifdef MSDOS_OR_ATARI
- s = (char*)(long)retval; /* ouch */
- #else
- s = (char*)retval; /* ouch */
- ***************
- *** 682,688 ****
- if (optype == O_IOCTL)
- retval = ioctl(fileno(stio->ifp), func, s);
- else
- ! #ifdef MSDOS
- fatal("fcntl is not implemented");
- #else
- #ifdef HAS_FCNTL
- --- 682,688 ----
- if (optype == O_IOCTL)
- retval = ioctl(fileno(stio->ifp), func, s);
- else
- ! #ifdef MSDOS_OR_ATARI
- fatal("fcntl is not implemented");
- #else
- #ifdef HAS_FCNTL
- ***************
- *** 2418,2424 ****
- int effective;
- register struct stat *statbufp;
- {
- ! #ifdef MSDOS
- /* [Comments and code from Len Reed]
- * MS-DOS "user" is similar to UNIX's "superuser," but can't write
- * to write-protected files. The execute permission bit is set
- --- 2418,2424 ----
- int effective;
- register struct stat *statbufp;
- {
- ! #ifdef MSDOS_OR_ATARI
- /* [Comments and code from Len Reed]
- * MS-DOS "user" is similar to UNIX's "superuser," but can't write
- * to write-protected files. The execute permission bit is set
- ***************
- *** 2437,2442 ****
- --- 2437,2445 ----
- * Sun's PC-NFS.]
- */
-
- + /* Atari stat() does pretty much the same thing. we set x_bit_set_in_stat
- + * too so it will actually look into the files for magic numbers
- + */
- return (bit & statbufp->st_mode) ? TRUE : FALSE;
-
- #else /* ! MSDOS */
- *** /home/bammi/etc/src/perl/eval.c Tue Jun 11 17:39:15 1991
- --- eval.c Sun Oct 6 18:14:39 1991
- ***************
- *** 379,385 ****
- old_rschar = rschar;
- old_rslen = rslen;
- rslen = 1;
- ! #ifdef MSDOS
- rschar = 0;
- #else
- #ifdef CSH
- --- 379,385 ----
- old_rschar = rschar;
- old_rslen = rslen;
- rslen = 1;
- ! #ifdef MSDOS_OR_ATARI
- rschar = 0;
- #else
- #ifdef CSH
- ***************
- *** 422,428 ****
- (void) interp(str,stab_val(last_in_stab),sp);
- st = stack->ary_array;
- tmpstr = Str_new(55,0);
- ! #ifdef MSDOS
- str_set(tmpstr, "perlglob ");
- str_scat(tmpstr,str);
- str_cat(tmpstr," |");
- --- 422,428 ----
- (void) interp(str,stab_val(last_in_stab),sp);
- st = stack->ary_array;
- tmpstr = Str_new(55,0);
- ! #ifdef MSDOS_OR_ATARI
- str_set(tmpstr, "perlglob ");
- str_scat(tmpstr,str);
- str_cat(tmpstr," |");
- ***************
- *** 2829,2836 ****
- stab = stabent(str_get(st[1]),TRUE);
- if (!stab || !(stio = stab_io(stab)) || !(fp = stio->ifp))
- goto say_undef;
- ! #ifdef MSDOS
- str_set(str, (setmode(fileno(fp), O_BINARY) != -1) ? Yes : No);
- #else
- str_set(str, Yes);
- #endif
- --- 2829,2846 ----
- stab = stabent(str_get(st[1]),TRUE);
- if (!stab || !(stio = stab_io(stab)) || !(fp = stio->ifp))
- goto say_undef;
- ! #ifdef MSDOS_OR_ATARI
- ! #ifdef atarist
- ! if(fflush(fp))
- ! str_set(str, No);
- ! else
- ! {
- ! fp->_flag |= _IOBIN;
- ! str_set(str, Yes);
- ! }
- ! #else
- str_set(str, (setmode(fileno(fp), O_BINARY) != -1) ? Yes : No);
- + #endif
- #else
- str_set(str, Yes);
- #endif
- ***************
- *** 2905,2911 ****
- --- 2915,2925 ----
- case O_SYSCALL:
- value = (double)do_syscall(arglast);
- goto donumset;
- + #ifdef atarist
- + case PERL_O_PIPE:
- + #else
- case O_PIPE:
- + #endif
- #ifdef HAS_PIPE
- if ((arg[1].arg_type & A_MASK) == A_WORD)
- stab = arg[1].arg_ptr.arg_stab;
- *** /home/bammi/etc/src/perl/handy.h Tue Jun 11 17:39:22 1991
- --- handy.h Sun Oct 6 14:25:51 1991
- ***************
- *** 52,58 ****
- --- 52,62 ----
- #define strnNE(s1,s2,l) (strncmp(s1,s2,l))
- #define strnEQ(s1,s2,l) (!strncmp(s1,s2,l))
-
- + #ifdef STANDARD_C
- + #define MEM_SIZE size_t
- + #else
- #define MEM_SIZE unsigned int
- + #endif
-
- /* Line numbers are unsigned, 16 bits. */
- typedef unsigned short line_t;
- *** /home/bammi/etc/src/perl/perl.c Wed Jun 19 11:18:28 1991
- --- perl.c Sun Oct 6 19:16:13 1991
- ***************
- *** 218,224 ****
- argv[0] = e_tmpname;
- }
-
- ! #ifdef MSDOS
- #define PERLLIB_SEP ';'
- #else
- #define PERLLIB_SEP ':'
- --- 218,224 ----
- argv[0] = e_tmpname;
- }
-
- ! #ifdef MSDOS_OR_ATARI
- #define PERLLIB_SEP ';'
- #else
- #define PERLLIB_SEP ':'
- ***************
- *** 275,293 ****
-
- bufend = s + strlen(s);
- while (*s) {
- ! #ifndef MSDOS
- s = cpytill(tokenbuf,s,bufend,':',&len);
- #else
- for (len = 0; *s && *s != ';'; tokenbuf[len++] = *s++);
- tokenbuf[len] = '\0';
- #endif
- if (*s)
- s++;
- ! #ifndef MSDOS
- if (len && tokenbuf[len-1] != '/')
- #else
- if (len && tokenbuf[len-1] != '\\')
- #endif
- (void)strcat(tokenbuf+len,"/");
- (void)strcat(tokenbuf+len,argv[0]);
- #ifdef DEBUGGING
- --- 275,302 ----
-
- bufend = s + strlen(s);
- while (*s) {
- ! #ifndef MSDOS_OR_ATARI
- s = cpytill(tokenbuf,s,bufend,':',&len);
- #else
- + #ifdef atarist
- + for (len = 0; *s && *s != ',' && *s != ';'; tokenbuf[len++] = *s++);
- + tokenbuf[len] = '\0';
- + #else
- for (len = 0; *s && *s != ';'; tokenbuf[len++] = *s++);
- tokenbuf[len] = '\0';
- #endif
- + #endif
- if (*s)
- s++;
- ! #ifndef MSDOS_OR_ATARI
- if (len && tokenbuf[len-1] != '/')
- #else
- + #ifdef atarist
- + if (len && ((tokenbuf[len-1] != '\\') || (tokenbuf[len-1] != '/')))
- + #else
- if (len && tokenbuf[len-1] != '\\')
- #endif
- + #endif
- (void)strcat(tokenbuf+len,"/");
- (void)strcat(tokenbuf+len,argv[0]);
- #ifdef DEBUGGING
- ***************
- *** 332,338 ****
- -e '/^#[ ]*endif/b' \
- -e 's/^#.*//' \
- %s | %s -C %s %s",
- ! #ifdef MSDOS
- "",
- #else
- "/bin/",
- --- 341,347 ----
- -e '/^#[ ]*endif/b' \
- -e 's/^#.*//' \
- %s | %s -C %s %s",
- ! #ifdef MSDOS_OR_ATARI
- "",
- #else
- "/bin/",
- ***************
- *** 1201,1206 ****
- --- 1210,1218 ----
- stdout);
- #endif
- #endif
- + #ifdef atarist
- + fputs("atariST series port, ++jrb bammi@cadence.com\n", stdout);
- + #endif
- fputs("\n\
- Perl may be copied only under the terms of either the Artistic License or the\n\
- GNU General Public License, which may be found in the Perl 4.0 source kit.\n",stdout);
- ***************
- *** 1242,1248 ****
- fprintf(stderr, "unexec of %s into %s failed!\n", perlpath, dumpname);
- exit(status);
- #else
- ! #ifdef MSDOS
- abort(); /* nothing else to do */
- #else /* ! MSDOS */
- # ifndef SIGABRT
- --- 1254,1260 ----
- fprintf(stderr, "unexec of %s into %s failed!\n", perlpath, dumpname);
- exit(status);
- #else
- ! #ifdef MSDOS_OR_ATARI
- abort(); /* nothing else to do */
- #else /* ! MSDOS */
- # ifndef SIGABRT
- *** /home/bammi/etc/src/perl/perl.h Wed Jun 19 11:18:29 1991
- --- perl.h Sun Oct 6 17:55:59 1991
- ***************
- *** 25,31 ****
- #define VOIDWANT 1
- #include "config.h"
-
- ! #ifdef MSDOS
- /* This stuff now in the MS-DOS config.h file. */
- #else /* !MSDOS */
-
- --- 25,36 ----
- #define VOIDWANT 1
- #include "config.h"
-
- ! /* define this once if either system, instead of cluttering up the src */
- ! #if defined(MSDOS) || defined(atarist)
- ! #define MSDOS_OR_ATARI 1
- ! #endif
- !
- ! #ifdef MSDOS_OR_ATARI
- /* This stuff now in the MS-DOS config.h file. */
- #else /* !MSDOS */
-
- ***************
- *** 377,383 ****
- --- 382,392 ----
- #undef f_next
- #endif
-
- + #if STANDARD_C
- + typedef size_t STRLEN;
- + #else
- typedef unsigned int STRLEN;
- + #endif
-
- typedef struct arg ARG;
- typedef struct cmd CMD;
- ***************
- *** 473,479 ****
-
- #define GROWSTR(pp,lp,len) if (*(lp) < (len)) growstr(pp,lp,len)
-
- ! #ifndef MSDOS
- #define STR_GROW(str,len) if ((str)->str_len < (len)) str_grow(str,len)
- #define Str_Grow str_grow
- #else
- --- 482,488 ----
-
- #define GROWSTR(pp,lp,len) if (*(lp) < (len)) growstr(pp,lp,len)
-
- ! #ifndef MSDOS_OR_ATARI
- #define STR_GROW(str,len) if ((str)->str_len < (len)) str_grow(str,len)
- #define Str_Grow str_grow
- #else
- ***************
- *** 481,487 ****
- #define STR_GROW(str,len) if ((str)->str_len < (unsigned long)len) \
- str_grow(str,(unsigned long)len)
- #define Str_Grow(str,len) str_grow(str,(unsigned long)(len))
- ! #endif /* MSDOS */
-
- #ifndef BYTEORDER
- #define BYTEORDER 0x1234
- --- 490,496 ----
- #define STR_GROW(str,len) if ((str)->str_len < (unsigned long)len) \
- str_grow(str,(unsigned long)len)
- #define Str_Grow(str,len) str_grow(str,(unsigned long)(len))
- ! #endif /* MSDOS_OR_ATARI */
-
- #ifndef BYTEORDER
- #define BYTEORDER 0x1234
- ***************
- *** 727,733 ****
- EXT bool tainted INIT(FALSE); /* using variables controlled by $< */
- #endif
-
- ! #ifndef MSDOS
- #define TMPPATH "/tmp/perl-eXXXXXX"
- #else
- #define TMPPATH "plXXXXXX"
- --- 736,742 ----
- EXT bool tainted INIT(FALSE); /* using variables controlled by $< */
- #endif
-
- ! #ifndef MSDOS_OR_ATARI
- #define TMPPATH "/tmp/perl-eXXXXXX"
- #else
- #define TMPPATH "plXXXXXX"
- *** /home/bammi/etc/src/perl/regcomp.c Tue Jun 11 17:40:21 1991
- --- regcomp.c Sun Oct 6 18:17:18 1991
- ***************
- *** 77,83 ****
- --- 77,87 ----
- #define ISMULT1(c) ((c) == '*' || (c) == '+' || (c) == '?')
- #define ISMULT2(s) ((*s) == '*' || (*s) == '+' || (*s) == '?' || \
- ((*s) == '{' && regcurly(s)))
- + #ifdef atarist
- + #define PERL_META "^$.[()|?+*\\"
- + #else
- #define META "^$.[()|?+*\\"
- + #endif
-
- #ifdef SPSTART
- #undef SPSTART /* dratted cpp namespace... */
- *** /home/bammi/etc/src/perl/str.c Wed Jun 19 11:18:43 1991
- --- str.c Sun Oct 6 14:53:02 1991
- ***************
- *** 76,82 ****
- char *
- str_grow(str,newlen)
- register STR *str;
- ! #ifndef MSDOS
- register int newlen;
- #else
- unsigned long newlen;
- --- 76,82 ----
- char *
- str_grow(str,newlen)
- register STR *str;
- ! #ifndef MSDOS_OR_ATARI
- register int newlen;
- #else
- unsigned long newlen;
- *** /home/bammi/etc/src/perl/toke.c Wed Jun 19 11:18:45 1991
- --- toke.c Sun Oct 6 18:16:45 1991
- ***************
- *** 52,58 ****
- --- 52,62 ----
- #endif
- #define CLINE (cmdline = (curcmd->c_line < cmdline ? curcmd->c_line : cmdline))
-
- + #ifdef atarist
- + #define PERL_META(c) ((c) | 128)
- + #else
- #define META(c) ((c) | 128)
- + #endif
-
- #define RETURN(retval) return (bufptr = s,(int)retval)
- #define OPERATOR(retval) return (expectterm = TRUE,bufptr = s,(int)retval)
- ***************
- *** 91,99 ****
- --- 95,109 ----
- /* This does similarly for list operators, merely by pretending that the
- * paren came before the listop rather than after.
- */
- + #ifdef atarist
- + #define LOP(f) return(CLINE, *s == '(' || (s = skipspace(s), *s == '(') ? \
- + (*s = PERL_META('('), bufptr = oldbufptr, '(') : \
- + (yylval.ival=f,expectterm = TRUE,bufptr = s,(int)LISTOP))
- + #else
- #define LOP(f) return(CLINE, *s == '(' || (s = skipspace(s), *s == '(') ? \
- (*s = META('('), bufptr = oldbufptr, '(') : \
- (yylval.ival=f,expectterm = TRUE,bufptr = s,(int)LISTOP))
- + #endif
- /* grandfather return to old style */
- #define OLDLOP(f) return(yylval.ival=f,expectterm = TRUE,bufptr = s,(int)LISTOP)
-
- ***************
- *** 139,145 ****
- --- 149,159 ----
- if (*s != '(')
- s = skipspace(s);
- if (*s == '(') {
- + #ifdef atarist
- + *s = PERL_META('(');
- + #else
- *s = META('(');
- + #endif
- bufptr = oldbufptr;
- return '(';
- }
- ***************
- *** 977,983 ****
- --- 991,1001 ----
- if (strEQ(d,"package"))
- OPERATOR(PACKAGE);
- if (strEQ(d,"pipe"))
- + #ifdef atarist
- + FOP22(PERL_O_PIPE);
- + #else
- FOP22(O_PIPE);
- + #endif
- break;
- case 'q': case 'Q':
- SNARFWORD;
- *** /home/bammi/etc/src/perl/util.c Tue Jun 11 17:41:13 1991
- --- util.c Sun Oct 6 17:37:39 1991
- ***************
- *** 1192,1198 ****
- #endif /* BYTEORDER != 0x4321 */
- #endif /* HAS_HTONS */
-
- ! #ifndef MSDOS
- FILE *
- mypopen(cmd,mode)
- char *cmd;
- --- 1192,1198 ----
- #endif /* BYTEORDER != 0x4321 */
- #endif /* HAS_HTONS */
-
- ! #ifndef MSDOS_OR_ATARI
- FILE *
- mypopen(cmd,mode)
- char *cmd;
- ***************
- *** 1264,1271 ****
- forkprocess = pid;
- return fdopen(p[this], mode);
- }
- ! #endif /* !MSDOS */
-
- #ifdef NOTDEF
- dumpfds(s)
- char *s;
- --- 1264,1283 ----
- forkprocess = pid;
- return fdopen(p[this], mode);
- }
- ! #else
- ! #ifdef atarist
- ! FILE *popen();
- ! FILE *
- ! mypopen(cmd,mode)
- ! char *cmd;
- ! char *mode;
- ! {
- ! return popen(cmd, mode);
- ! }
- ! #endif
-
- + #endif /* !MSDOS_OR_ATARI */
- +
- #ifdef NOTDEF
- dumpfds(s)
- char *s;
- ***************
- *** 1306,1312 ****
- }
- #endif
-
- ! #ifndef MSDOS
- int
- mypclose(ptr)
- FILE *ptr;
- --- 1318,1324 ----
- }
- #endif
-
- ! #ifndef MSDOS_OR_ATARI
- int
- mypclose(ptr)
- FILE *ptr;
- ***************
- *** 1402,1408 ****
- #endif
- return;
- }
- ! #endif /* !MSDOS */
-
- #ifndef HAS_MEMCMP
- memcmp(s1,s2,len)
- --- 1414,1430 ----
- #endif
- return;
- }
- ! #else
- ! #ifdef atarist
- ! int pclose();
- ! int
- ! mypclose(ptr)
- ! FILE *ptr;
- ! {
- ! return pclose(ptr);
- ! }
- ! #endif
- ! #endif /* !MSDOS_OR_ATARI */
-
- #ifndef HAS_MEMCMP
- memcmp(s1,s2,len)
- *** malloc.c.orig Tue Oct 8 13:53:30 1991
- --- malloc.c Tue Oct 8 14:03:17 1991
- ***************
- *** 112,122 ****
-
- MALLOCPTRTYPE *
- malloc(nbytes)
- ! register unsigned nbytes;
- {
- register union overhead *p;
- register int bucket = 0;
- ! register unsigned shiftr;
-
- /*
- * Convert amount of memory requested into
- --- 112,122 ----
-
- MALLOCPTRTYPE *
- malloc(nbytes)
- ! register unsigned long nbytes;
- {
- register union overhead *p;
- register int bucket = 0;
- ! register unsigned long shiftr;
-
- /*
- * Convert amount of memory requested into
- ***************
- *** 176,182 ****
- register union overhead *op;
- register int rnu; /* 2^rnu bytes will be requested */
- register int nblks; /* become nblks blocks of the desired size */
- ! register int siz;
-
- if (nextf[bucket])
- return;
- --- 176,182 ----
- register union overhead *op;
- register int rnu; /* 2^rnu bytes will be requested */
- register int nblks; /* become nblks blocks of the desired size */
- ! register long siz;
-
- if (nextf[bucket])
- return;
- ***************
- *** 185,194 ****
- * on a page boundary. Should
- * make getpageize call?
- */
- ! op = (union overhead *)sbrk(0);
- #ifndef I286
- ! if ((int)op & 0x3ff)
- ! (void)sbrk(1024 - ((int)op & 0x3ff));
- #else
- /* The sbrk(0) call on the I286 always returns the next segment */
- #endif
- --- 185,194 ----
- * on a page boundary. Should
- * make getpageize call?
- */
- ! op = (union overhead *)sbrk(0L);
- #ifndef I286
- ! if ((unsigned int)op & 0x3ff)
- ! (void)sbrk((long)(1024L - ((int)op & 0x3ff)));
- #else
- /* The sbrk(0) call on the I286 always returns the next segment */
- #endif
- ***************
- *** 204,210 ****
- nblks = 1 << (rnu - (bucket + 3)); /* how many blocks to get */
- if (rnu < bucket)
- rnu = bucket;
- ! op = (union overhead *)sbrk(1 << rnu);
- /* no more room! */
- if ((int)op == -1)
- return;
- --- 204,210 ----
- nblks = 1 << (rnu - (bucket + 3)); /* how many blocks to get */
- if (rnu < bucket)
- rnu = bucket;
- ! op = (union overhead *)sbrk(1L << rnu);
- /* no more room! */
- if ((int)op == -1)
- return;
- ***************
- *** 236,242 ****
- free(mp)
- MALLOCPTRTYPE *mp;
- {
- ! register int size;
- register union overhead *op;
- char *cp = (char*)mp;
-
- --- 236,242 ----
- free(mp)
- MALLOCPTRTYPE *mp;
- {
- ! register long size;
- register union overhead *op;
- char *cp = (char*)mp;
-
- ***************
- *** 283,289 ****
- MALLOCPTRTYPE *
- realloc(mp, nbytes)
- MALLOCPTRTYPE *mp;
- ! unsigned nbytes;
- {
- register u_int onb;
- union overhead *op;
- --- 283,289 ----
- MALLOCPTRTYPE *
- realloc(mp, nbytes)
- MALLOCPTRTYPE *mp;
- ! unsigned long nbytes;
- {
- register u_int onb;
- union overhead *op;
-