1.0.8.5-1.0.8.6.gz

patches · 2.5 KB · 2010-03-30

Download   « Back to the patches list

Common subdirectories: /usr/home/clay/1.0.8.5/dgd/bin and dgd/bin
Common subdirectories: /usr/home/clay/1.0.8.5/dgd/doc and dgd/doc
Common subdirectories: /usr/home/clay/1.0.8.5/dgd/mud and dgd/mud
Common subdirectories: /usr/home/clay/1.0.8.5/dgd/pkg and dgd/pkg
Common subdirectories: /usr/home/clay/1.0.8.5/dgd/src and dgd/src
Common subdirectories: /usr/home/clay/1.0.8.5/dgd/tmp and dgd/tmp
diff -cr /usr/home/clay/1.0.8.5/dgd/doc/Introduction dgd/doc/Introduction
*** /usr/home/clay/1.0.8.5/dgd/doc/Introduction	Sun May 29 18:22:27 1994
--- dgd/doc/Introduction	Thu Sep 29 21:30:07 1994
***************
*** 104,110 ****
  
  	Called in an object which has just been cloned, or if it is not a
  	clone, just before a function is called in it for the first time.
! 	The actual name of this function is configurable.
  
   - in the user object (returned by driver->telnet_connect() or
     driver->binary_connect()):
--- 104,112 ----
  
  	Called in an object which has just been cloned, or if it is not a
  	clone, just before a function is called in it for the first time.
! 	The actual name of this function is configurable.  Note that the
! 	driver can call this function even if it is static and in the auto
! 	object.
  
   - in the user object (returned by driver->telnet_connect() or
     driver->binary_connect()):
diff -cr /usr/home/clay/1.0.8.5/dgd/doc/Porting dgd/doc/Porting
*** /usr/home/clay/1.0.8.5/dgd/doc/Porting	Wed Sep 28 20:45:35 1994
--- dgd/doc/Porting	Thu Sep 29 21:30:07 1994
***************
*** 13,23 ****
  or add your own host support to the src/host.h file.  There are some systems
  which I don't support directly yet, but for which porting is easy:
  NeXT	use GENERIC_BSD, but in host/Makefile replace dirent.* by direct.*
! Solaris	use GENERIC_SYSV, set LIBS to -lsocket -lnsl
! ULTRIX	use GENERIC_BSD, but define ALLOCA as ALLOC and AFREE as FREE
  AIX	use GENERIC_SYSV, but change the definitions of UCHAR and SCHAR to
! 	the outcommented versions in the MINIX_68K entry (AIX characters
! 	are unsigned), also add #include <sys/select.h> to host/unix/connect.c
  
     Things may become more difficult if you want to port DGD to a different
  type of host.  I planned a port to the Mac and MSDOS myself, but so far
--- 13,24 ----
  or add your own host support to the src/host.h file.  There are some systems
  which I don't support directly yet, but for which porting is easy:
  NeXT	use GENERIC_BSD, but in host/Makefile replace dirent.* by direct.*
! Solaris	use GENERIC_SYSV, in Makefile set LIBS to -lsocket -lnsl
! ULTRIX	use GENERIC_BSD
  AIX	use GENERIC_SYSV, but change the definitions of UCHAR and SCHAR to
! 	the outcommented versions in the MINIX_68K entry in host.h (AIX
! 	characters are unsigned), also add #include <sys/select.h> to
! 	host/unix/connect.c
  
     Things may become more difficult if you want to port DGD to a different
  type of host.  I planned a port to the Mac and MSDOS myself, but so far
Common subdirectories: /usr/home/clay/1.0.8.5/dgd/doc/kfun and dgd/doc/kfun
diff -cr /usr/home/clay/1.0.8.5/dgd/src/Changelog dgd/src/Changelog
*** /usr/home/clay/1.0.8.5/dgd/src/Changelog	Wed Sep 28 20:45:36 1994
--- dgd/src/Changelog	Thu Sep 29 21:30:08 1994
***************
*** 720,722 ****
--- 720,723 ----
   - DGD will now compile without warnings using gcc 2.4.5 -ansi -pedantic.
   - Fixed a bug in telnet subnegotiations.
   - Fixed some other ANSI C pointer problems.
+  - The driver can now call static functions in the auto object.
Common subdirectories: /usr/home/clay/1.0.8.5/dgd/src/comp and dgd/src/comp
Common subdirectories: /usr/home/clay/1.0.8.5/dgd/src/ed and dgd/src/ed
Common subdirectories: /usr/home/clay/1.0.8.5/dgd/src/host and dgd/src/host
diff -cr /usr/home/clay/1.0.8.5/dgd/src/interpret.c dgd/src/interpret.c
*** /usr/home/clay/1.0.8.5/dgd/src/interpret.c	Tue Sep 27 18:32:24 1994
--- dgd/src/interpret.c	Thu Sep 29 21:30:11 1994
***************
*** 1647,1655 ****
      /* find the function in the symbol table */
      symb = ctrl_symb(ctrl, func);
      if (symb == (dsymbol *) NULL) {
! 	/* function doesn't exist in symbol table */
! 	i_pop(nargs);
! 	return FALSE;
      }
  
      ctrl = ctrl->inherits[UCHAR(symb->inherit)].obj->ctrl;
--- 1647,1665 ----
      /* find the function in the symbol table */
      symb = ctrl_symb(ctrl, func);
      if (symb == (dsymbol *) NULL) {
! 	if (call_static && ctrl->ninherits > 1) {
! 	    /* try auto object */
! 	    symb = ctrl_symb(o_control(ctrl->inherits[0].obj), func);
! 	    if (symb == (dsymbol *) NULL) {
! 		/* function doesn't exist in auto object symbol table */
! 		i_pop(nargs);
! 		return FALSE;
! 	    }
! 	} else {
! 	    /* function doesn't exist in symbol table */
! 	    i_pop(nargs);
! 	    return FALSE;
! 	}
      }
  
      ctrl = ctrl->inherits[UCHAR(symb->inherit)].obj->ctrl;
Common subdirectories: /usr/home/clay/1.0.8.5/dgd/src/kfun and dgd/src/kfun
Common subdirectories: /usr/home/clay/1.0.8.5/dgd/src/lex and dgd/src/lex
Common subdirectories: /usr/home/clay/1.0.8.5/dgd/src/lpc and dgd/src/lpc
diff -cr /usr/home/clay/1.0.8.5/dgd/src/version.h dgd/src/version.h
*** /usr/home/clay/1.0.8.5/dgd/src/version.h	Wed Sep 28 20:45:39 1994
--- dgd/src/version.h	Thu Sep 29 21:30:11 1994
***************
*** 1 ****
! # define VERSION	"1.0.8.5"
--- 1 ----
! # define VERSION	"1.0.8.6"
diff -cr /usr/home/clay/1.0.8.5/dgd/src/comp/control.c dgd/src/comp/control.c
*** /usr/home/clay/1.0.8.5/dgd/src/comp/control.c	Tue Sep 27 18:32:06 1994
--- dgd/src/comp/control.c	Thu Sep 29 21:30:10 1994
***************
*** 501,537 ****
  register control *ctrl;
  {
      register unsigned short n;
  
!     if (ctrl->ninherits == 1) {
! 	register dfuncdef *f;
! 	register oh *ohash;
! 
! 	/*
! 	 * For the auto object, add non-private functions from the function
! 	 * definition table.
! 	 */
! 	f = ctrl->funcdefs;
! 	ohash = oh_new(ctrl->inherits->obj->chain.name);
! 	for (n = ctrl->nfuncdefs, f = ctrl->funcdefs + n; n > 0; ) {
! 	    --n;
! 	    --f;
! 	    if (!(f->class & C_PRIVATE)) {
! 		ctrl_funcdef(ctrl, n, ohash);
! 	    }
! 	}
!     } else {
! 	register object *o;
! 	register dsymbol *symb;
! 
! 	/*
! 	 * The symbol table rather than the function definition table is
! 	 * used here.
! 	 */
! 	for (n = ctrl->nsymbols, symb = d_get_symbols(ctrl); n > 0; --n, symb++)
! 	{
! 	    o = ctrl->inherits[UCHAR(symb->inherit)].obj;
! 	    ctrl_funcdef(o->ctrl, UCHAR(symb->index), oh_new(o->chain.name));
! 	}
      }
  }
  
--- 501,516 ----
  register control *ctrl;
  {
      register unsigned short n;
+     register object *o;
+     register dsymbol *symb;
  
!     /*
!      * The symbol table rather than the function definition table is
!      * used here.
!      */
!     for (n = ctrl->nsymbols, symb = d_get_symbols(ctrl); n > 0; --n, symb++) {
! 	o = ctrl->inherits[UCHAR(symb->inherit)].obj;
! 	ctrl_funcdef(o->ctrl, UCHAR(symb->index), oh_new(o->chain.name));
      }
  }
  
***************
*** 879,885 ****
  								== C_STATIC) {
  		    /* static function in auto object replaces prototype */
  		    PROTO_CLASS(proto) |= C_LOCAL;
- 		    --nsymbs;
  		} else if (PROTO_FTYPE(proto2) == T_IMPLICIT &&
  			   (PROTO_CLASS(proto) & C_PRIVATE)) {
  		    /* private function replaces implicit prototype */
--- 858,863 ----
***************
*** 944,958 ****
  	/*
  	 * insert the definition before the old one in the hash table
  	 */
!     } else if (!(PROTO_CLASS(proto) & C_PRIVATE) && (!is_auto ||
! 	        (PROTO_CLASS(proto) & (C_STATIC | C_UNDEFINED)) != C_STATIC)) {
  	/*
  	 * add new prototype to symbol table
  	 */
  	nsymbs++;
-     } else {
- 	/* won't hurt for private functions */
- 	PROTO_CLASS(proto) |= C_LOCAL;
      }
  
      if (nfdefs == 256) {
--- 922,937 ----
  	/*
  	 * insert the definition before the old one in the hash table
  	 */
!     } else if (!(PROTO_CLASS(proto) & C_PRIVATE)) {
  	/*
  	 * add new prototype to symbol table
  	 */
+ 	if (is_auto &&
+ 	    (PROTO_CLASS(proto) & (C_STATIC | C_UNDEFINED)) == C_STATIC) {
+ 	    /* static functions in auto object are local */
+ 	    PROTO_CLASS(proto) |= C_LOCAL;
+ 	}
  	nsymbs++;
      }
  
      if (nfdefs == 256) {
***************
*** 1457,1463 ****
      register unsigned short i, n, x, ncoll;
      register dsymbol *symtab, *coll;
  
!     if ((newctrl->nsymbols = nsymbs) == 0) {
  	return;
      }
  
--- 1436,1442 ----
      register unsigned short i, n, x, ncoll;
      register dsymbol *symtab, *coll;
  
!     if ((newctrl->nsymbols=nsymbs) == 0) {
  	return;
      }
  
***************
*** 1487,1494 ****
  
  		if ((f->class & C_PRIVATE) ||
  		    ((f->class & (C_STATIC | C_UNDEFINED)) == C_STATIC &&
! 		     ctrl->ninherits == 1 &&
! 		     (is_auto || (ctrl->inherits->obj->flags & O_AUTO)))) {
  		    continue;
  		}
  		name = d_get_strconst(ctrl, f->inherit, f->index)->text;
--- 1466,1476 ----
  
  		if ((f->class & C_PRIVATE) ||
  		    ((f->class & (C_STATIC | C_UNDEFINED)) == C_STATIC &&
! 		     ctrl->ninherits == 1 && ctrl != newctrl)) {
! 		    /*
! 		     * Don't put static auto functions in the symbol table,
! 		     * except in the auto object itself.
! 		     */
  		    continue;
  		}
  		name = d_get_strconst(ctrl, f->inherit, f->index)->text;
Common subdirectories: /usr/home/clay/1.0.8.5/dgd/src/host/atarist and dgd/src/host/atarist
Common subdirectories: /usr/home/clay/1.0.8.5/dgd/src/host/mac and dgd/src/host/mac
Common subdirectories: /usr/home/clay/1.0.8.5/dgd/src/host/minix68k and dgd/src/host/minix68k
Common subdirectories: /usr/home/clay/1.0.8.5/dgd/src/host/pc and dgd/src/host/pc
Common subdirectories: /usr/home/clay/1.0.8.5/dgd/src/host/unix and dgd/src/host/unix

Site Stats

Snippets: 1791
Codebases: 571