Diff for /gforth/Attic/primitives between versions 1.16 and 1.17

version 1.16, 1994/09/05 17:36:23 version 1.17, 1994/09/08 17:20:10
Line 608  deprep_terminal(); Line 608  deprep_terminal();
 return (Label *)n;  return (Label *)n;
   
 system  c_addr u -- n   own  system  c_addr u -- n   own
 n=system(cstr(c_addr,u));  n=system(cstr(c_addr,u,1));
   
 getenv  c_addr1 u1 -- c_addr2 u2        new  getenv  c_addr1 u1 -- c_addr2 u2        new
 c_addr2 = getenv(cstr(c_addr1,u1));  c_addr2 = getenv(cstr(c_addr1,u1,1));
 u2=strlen(c_addr2);  u2=strlen(c_addr2);
   
 popen   c_addr u n -- wfileid   own  popen   c_addr u n -- wfileid   own
 static char* mode[2]={"r","w"};  static char* mode[2]={"r","w"};
 wfileid=(Cell)popen(cstr(c_addr,u),mode[n]);  wfileid=(Cell)popen(cstr(c_addr,u,1),mode[n]);
   
 pclose  wfileid -- wior         own  pclose  wfileid -- wior         own
 wior=pclose((FILE *)wfileid);  wior=pclose((FILE *)wfileid);
Line 713  close-file wfileid -- wior file close_fi Line 713  close-file wfileid -- wior file close_fi
 wior = FILEIO(fclose((FILE *)wfileid)==EOF);  wior = FILEIO(fclose((FILE *)wfileid)==EOF);
   
 open-file       c_addr u ntype -- w2 wior       file    open_file  open-file       c_addr u ntype -- w2 wior       file    open_file
 w2 = (Cell)fopen(cstr(c_addr, u), fileattr[ntype]);  w2 = (Cell)fopen(cstr(c_addr, u,1), fileattr[ntype]);
 wior =  FILEEXIST(w2 == NULL);  wior =  FILEEXIST(w2 == NULL);
   
 create-file     c_addr u ntype -- w2 wior       file    create_file  create-file     c_addr u ntype -- w2 wior       file    create_file
 int     fd;  int     fd;
 fd = creat(cstr(c_addr, u), 0644);  fd = creat(cstr(c_addr, u,1), 0644);
 if (fd > -1) {  if (fd > -1) {
   w2 = (Cell)fdopen(fd, fileattr[ntype]);    w2 = (Cell)fdopen(fd, fileattr[ntype]);
   assert(w2 != NULL);    assert(w2 != NULL);
Line 730  if (fd > -1) { Line 730  if (fd > -1) {
 }  }
   
 delete-file     c_addr u -- wior                file    delete_file  delete-file     c_addr u -- wior                file    delete_file
 wior = FILEEXIST(unlink(cstr(c_addr, u)));  wior = FILEEXIST(unlink(cstr(c_addr, u,1)));
   
 rename-file     c_addr1 u1 c_addr2 u2 -- wior   file-ext        rename_file  rename-file     c_addr1 u1 c_addr2 u2 -- wior   file-ext        rename_file
 wior = FILEEXIST(rename(cstr1(c_addr1, u1), cstr(c_addr2, u2)));  char *s1=cstr(c_addr2, u2,1);
   wior = FILEEXIST(rename(cstr(c_addr1, u1, 0), s1));
   
 file-position   wfileid -- ud wior      file    file_position  file-position   wfileid -- ud wior      file    file_position
 /* !! use tell and lseek? */  /* !! use tell and lseek? */
Line 905  memmove(c_addr,sig,u); Line 906  memmove(c_addr,sig,u);
 >float  c_addr u -- flag        float   to_float  >float  c_addr u -- flag        float   to_float
 /* real signature: c_addr u -- r t / f */  /* real signature: c_addr u -- r t / f */
 Float r;  Float r;
 char *number=cstr(c_addr, u);  char *number=cstr(c_addr, u, 1);
 char *endconv;  char *endconv;
 r=strtod(number,&endconv);  r=strtod(number,&endconv);
 if((flag=FLAG(!(int)*endconv)))  if((flag=FLAG(!(int)*endconv)))

Removed from v.1.16  
changed lines
  Added in v.1.17


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>