diff3.2@246-247.gz
snippets · 4.8 KB · 2010-03-30
LPMud 3.2 driver diff from patch level 246 to 247 (Jan 1994).
Download « Back to the snippets list
diff -c driver/patchlevel.h:1.267 driver/patchlevel.h:1.268
*** driver/patchlevel.h:1.267 Sun Jan 9 22:09:15 1994
--- driver/patchlevel.h Sun Jan 9 22:09:15 1994
***************
*** 1,2 ****
! #define RELEASE_DATE "Fri Dec 17 22:18:50 MET 1993"
! #define PATCH_LEVEL "@246"
--- 1,2 ----
! #define RELEASE_DATE "Sun Jan 9 22:06:21 MET 1994"
! #define PATCH_LEVEL "@247"
diff -c driver/Makefile.in:1.6 driver/Makefile.in:1.7
*** driver/Makefile.in:1.6 Sun Jan 9 22:09:08 1994
--- driver/Makefile.in Sun Jan 9 22:09:08 1994
***************
*** 1,4 ****
! # This lines are needed on some machines.
MAKE=make
SHELL=/bin/sh
#
--- 1,4 ----
! # These lines are needed on some machines.
MAKE=make
SHELL=/bin/sh
#
diff -c driver/closure.c:1.37 driver/closure.c:1.39
*** driver/closure.c:1.37 Sun Jan 9 22:09:09 1994
--- driver/closure.c Sun Jan 9 22:09:09 1994
***************
*** 357,363 ****
unsigned char *new_code;
current.code_left += current.code_max;
! current.code_max = new_max = current.value_max << 1;
new_code = rexalloc(current.code, new_max);
current.codep += new_code - current.code;
current.code = new_code;
--- 357,363 ----
unsigned char *new_code;
current.code_left += current.code_max;
! current.code_max = new_max = current.code_max << 1;
new_code = rexalloc(current.code, new_max);
current.codep += new_code - current.code;
current.code = new_code;
***************
*** 1220,1226 ****
current.codep = p;
break;
}
! } else switch (argp->x.closure_type) {
default:
{
/* simul_efun */
--- 1220,1226 ----
current.codep = p;
break;
}
! } else switch (type) {
default:
{
/* simul_efun */
***************
*** 1321,1326 ****
--- 1321,1327 ----
{
struct lambda *l;
+ l = argp->u.lambda;
if (block->size != 1)
lambda_error("Argument to variable\n");
if (l->ob != current.lambda_origin) {
diff -c driver/configure:1.11 driver/configure:1.12
*** driver/configure:1.11 Sun Jan 9 22:09:10 1994
--- driver/configure Sun Jan 9 22:09:10 1994
***************
*** 2085,2091 ****
MOVE_YACC_TAB='$(MV) $(YACCTAB)c'
CLEAN_YACC_TAB=''
else
! MOVE_YACC_TAB='tail +2 $(YACCTAB)c >>'
CLEAN_YACC_TAB='$(RM) $(YACCTAB)c'
fi
rm -f conftest*
--- 2085,2091 ----
MOVE_YACC_TAB='$(MV) $(YACCTAB)c'
CLEAN_YACC_TAB=''
else
! MOVE_YACC_TAB='tail +2 $(YACCTAB)c >'
CLEAN_YACC_TAB='$(RM) $(YACCTAB)c'
fi
rm -f conftest*
diff -c driver/ed.c:1.26 driver/ed.c:1.27
*** driver/ed.c:1.26 Sun Jan 9 22:09:11 1994
--- driver/ed.c Sun Jan 9 22:09:11 1994
***************
*** 1145,1172 ****
int move(num)
int num;
{
! int range;
! LINE *before, *first, *last, *after;
! if( P_LINE1 <= num && num <= P_LINE2 )
return( ERR );
- range = P_LINE2 - P_LINE1 + 1;
- before = getptr(prevln(P_LINE1));
first = getptr(P_LINE1);
last = getptr(P_LINE2);
! after = getptr(nextln(P_LINE2));
relink(before, after, before, after);
- P_LASTLN -= range; /* per AST's posted patch 2/2/88 */
- if (num > P_LINE1)
- num -= range;
! before = getptr(num);
! after = getptr(nextln(num));
relink(before, first, last, after);
relink(last, after, before, first);
! P_LASTLN += range; /* per AST's posted patch 2/2/88 */
! _setCurLn( num + range );
return( 1 );
}
--- 1145,1170 ----
int move(num)
int num;
{
! LINE *dest, *before, *first, *last, *after;
! dest = getptr(num);
! if (num < P_LINE1)
! num += P_LINE2 - P_LINE1 + 1;
! else if (num <= P_LINE2)
return( ERR );
first = getptr(P_LINE1);
+ before = first->l_prev;
last = getptr(P_LINE2);
! after = last->l_next;
relink(before, after, before, after);
! before = dest;
! after = dest->l_next;
relink(before, first, last, after);
relink(last, after, before, first);
! P_CURPTR = last;
! P_CURLN = num;
return( 1 );
}
diff -c driver/interpret.c:1.165 driver/interpret.c:1.166
*** driver/interpret.c:1.165 Sun Jan 9 22:09:13 1994
--- driver/interpret.c Sun Jan 9 22:09:15 1994
***************
*** 6051,6056 ****
--- 6051,6057 ----
break;
CASE(F_CALL_OUT_INFO);
inter_sp = sp;
+ inter_pc = pc;
if (privilege_violation("call_out_info", sp) > 0 ) {
push_referenced_vector(get_all_call_outs());
break;
diff -c driver/simulate.c:1.62 driver/simulate.c:1.63
*** driver/simulate.c:1.62 Sun Jan 9 22:09:16 1994
--- driver/simulate.c Sun Jan 9 22:09:17 1994
***************
*** 2708,2714 ****
"Calls to add_message: %d Packets: %d Average packet size: %.2f\n\n",
add_message_calls,
inet_packets,
! (float)inet_volume/(float)inet_packets
);
add_message(print_buff);
#endif
--- 2708,2714 ----
"Calls to add_message: %d Packets: %d Average packet size: %.2f\n\n",
add_message_calls,
inet_packets,
! inet_packets ? (float)inet_volume/(float)inet_packets : 0.0
);
add_message(print_buff);
#endif
diff -c driver/autoconf/configure.in:1.11 driver/autoconf/configure.in:1.12
*** driver/autoconf/configure.in:1.11 Sun Jan 9 22:09:18 1994
--- driver/autoconf/configure.in Sun Jan 9 22:09:18 1994
***************
*** 442,448 ****
MOVE_YACC_TAB='$(MV) $(YACCTAB)c'
CLEAN_YACC_TAB=''
else
! MOVE_YACC_TAB='tail +2 $(YACCTAB)c >>'
CLEAN_YACC_TAB='$(RM) $(YACCTAB)c'
fi
rm -f conftest*
--- 442,448 ----
MOVE_YACC_TAB='$(MV) $(YACCTAB)c'
CLEAN_YACC_TAB=''
else
! MOVE_YACC_TAB='tail +2 $(YACCTAB)c >'
CLEAN_YACC_TAB='$(RM) $(YACCTAB)c'
fi
rm -f conftest*
diff -c driver/hosts/amiga/CHANGELOG:1.18 driver/hosts/amiga/CHANGELOG:1.19
*** driver/hosts/amiga/CHANGELOG:1.18 Sun Jan 9 22:09:21 1994
--- driver/hosts/amiga/CHANGELOG Sun Jan 9 22:09:21 1994
***************
*** 43,50 ****
04-Oct-93 [lars]
Upgraded PlayMud to version 1.6.
! 09-Apr-93..09-Dec-93 [lars]
! Merged in patches for @31..243.
15-Nov-93 [lars]
Upgraded PlayMud to version 1.7.
--- 43,53 ----
04-Oct-93 [lars]
Upgraded PlayMud to version 1.6.
! 02-Jan-94 [lars]
! Fixed a signal loss due to incomplete cleanup of the timers in signal.c
!
! 09-Apr-93..14-Dec-93 [lars]
! Merged in patches for @31..246.
15-Nov-93 [lars]
Upgraded PlayMud to version 1.7.
diff -c driver/hosts/amiga/amiga.c:1.9 driver/hosts/amiga/amiga.c:1.10
*** driver/hosts/amiga/amiga.c:1.9 Sun Jan 9 22:09:21 1994
--- driver/hosts/amiga/amiga.c Sun Jan 9 22:09:21 1994
***************
*** 11,16 ****
--- 11,18 ----
** 20-Sep-93 [lars] Fixed small but fatal bug in chmod().
** 23-Nov-93 [lars] Made version string more style conform.
** 30-Nov-93 [lars] ixconvert() et al. exported into ixfile.c
+ ** 16-Dec-93 [lars] SystemTagList() exported into ixfile.c
+ ** 02-Jan-94 [lars] Cleans up timers.
*/
/*-----------------------------------------------------------------------*/
***************
*** 101,106 ****
--- 103,109 ----
if (done++) return; /* May be called multiple times */
SetExcept (oldExceptSig, EXT_SIGINT | EXT_SIGHUP | sys_signal_alarm);
((struct Task*)FindTask(NULL))->tc_ExceptCode = oldException;
+ cleanup_timer(NULL);
#if defined(AMIGA_TCP)
amiga_sockexit();
#endif
***************
*** 179,194 ****
}
return(r);
}
-
- #ifndef DICE206
- /*-----------------------------------------------------------------------
- ** Not used with OS 1.3, but statically mentioned with the lib.
- */
-
- LONG SystemTagList (UBYTE *command, /* struct TagItem * */ void *tags) {
- return 0;
- }
- #endif /* !DICE206 */
#endif /* !OS 2.0 */
--- 182,187 ----
diff -c /dev/null driver/hosts/amiga/ixfile.c:1.1
*** /dev/null Sun Jan 9 22:09:21 1994
--- driver/hosts/amiga/ixfile.c Sun Jan 9 22:09:22 1994
***************
*** 0 ****
--- 1,143 ----
+ /* hosts/amiga/ixfile.c
+ **
+ ** The functions needed to let the driver believe into a Unix-like
+ ** filesystem.
+ ** This is a separate file since its used by make_func as well.
+ ** Do NOT include hosts/amiga/ixfile.h here!
+ **
+ ** 30-Nov-93 [lars] Extracted from amiga.c
+ ** 16-Dec-93 [lars] SystemTagList() for 1.3 extracted from amiga.c
+ */
+
+ /*-----------------------------------------------------------------------*/
+
+ #include <exec/types.h>
+
+ #ifdef INCLUDE_VERSION
+ #include <dos/dos.h>
+ #include <clib/dos_protos.h>
+ #else
+ #include <libraries/dos.h>
+ #endif
+
+ #include <strings.h>
+
+ /*-----------------------------------------------------------------------
+ ** char *do_ixconvert (char *name)
+ ** char *ixconvert (char *fname)
+ ** char *ixconvert2 (char *fname)
+ **
+ ** do_ixconvert() takes a unix filename and amigaizes by changing it.
+ **
+ ** ixconvert() and ixconvert2() are the interface, each providing
+ ** an own static buffer for the changed name, thus keeping the original
+ ** intact.
+ */
+
+ #define BUFLEN 1024
+
+ char *do_ixconvert (char *name) {
+ char *s1;
+ int flag;
+
+ flag = 0;
+ while (!flag) {
+ /* Replace ':/' by ':' */
+ if ((s1 = strstr (name, ":/")) != NULL) strcpy (s1+1, s1+2);
+ /* Replace ':./' by ':' */
+ else if ((s1 = strstr (name, ":./")) != NULL) strcpy (s1+1, s1+3);
+ else flag = 1;
+ }
+ /* Replace ':../' by ':/' */
+ if ((s1 = strstr (name, ":../")) != NULL) strcpy (s1+1, s1+3);
+
+ /* Remove leading '/' */
+ for (s1 = name; *s1 == '/'; s1++);
+ if (s1 != name) strcpy (name, s1);
+
+ /* Replace '../' by '/' */
+ for (s1 = name; (s1 = strstr (s1, "../")) != NULL; strcpy (s1, s1+2));
+
+ /* Replace './' by '' */
+ for (s1 = name; (s1 = strstr (s1, "./")) != NULL; strcpy (s1, s1+2));
+
+ /* Remove trailing '/.' */
+ while ((flag=strlen(name)) >= 2 && !strcmp (s1 = name+flag-2, "/."))
+ *s1 = '\0';
+
+ /* Replace trailing '/..' by '/' */
+ if (strlen(name) >= 3 && !strcmp (s1 = name+strlen(name)-3, "/.."))
+ strcpy (s1, "/");
+
+ /* Replace '..' name by '/' */
+ if (!strcmp (name, "..")) strcpy (name, "/");
+
+ /* Replace '.' name by '' */
+ if (!strcmp (name, ".")) *name = '\0';
+ return name;
+ }
+
+ char *ixconvert (char *fname) {
+ static char name[BUFLEN];
+
+ if (strlen(fname) < BUFLEN) strcpy (name, fname);
+ else { strncpy (name, fname, BUFLEN-1); name[BUFLEN-1] = '\0'; }
+ return do_ixconvert (name);
+ }
+
+ char *ixconvert2 (char *fname) {
+ static char name[BUFLEN];
+
+ if (strlen(fname) < BUFLEN) strcpy (name, fname);
+ else { strncpy (name, fname, BUFLEN-1); name[BUFLEN-1] = '\0'; }
+ return do_ixconvert (name);
+ }
+
+ /*-----------------------------------------------------------------------
+ ** Set the access mode of a file.
+ ** For Amiga-OS, only the owner access can be set.
+ ** It is not guaranteed that the mode will be checked with any OS
+ ** older than 2.0.
+ */
+
+ int chmod (char *file, long mode) {
+ BPTR lock;
+ struct FileInfoBlock *info;
+ int rc;
+
+ /* Unix mode 'rwx??????' => DOS mode 'rwxw' aka 'rwxd'.
+ ** Well, this should be done using the FIB* constants from dos.h
+ ** but they will hardly change and 'knowing' them keeps this a one-liner.
+ ** Note that the Amiga-OS bits disallow the operation when set.
+ */
+ mode = ~((mode & 0700) >> 5 | (mode & 0200) >> 7) & 017;
+ info = (struct FileInfoBlock *) malloc (sizeof (struct FileInfoBlock));
+ if (info == NULL) return -1;
+ rc = -1;
+ if ((lock = Lock (file, SHARED_LOCK)) == NULL) goto chmod_exit;
+ if (Examine (lock, info) == DOSFALSE) goto chmod_exit;
+ UnLock (lock);
+ if (SetProtection (file, (info->fib_Protection & (~017)) | mode) != DOSFALSE)
+ rc = 0;
+ chmod_exit:
+ free (info);
+ return rc;
+ }
+
+ /*-----------------------------------------------------------------------*/
+
+ #if defined(_DCC) && !defined(INCLUDE_VERSION) && !defined(DICE206)
+
+ /*-----------------------------------------------------------------------
+ ** Not used with OS 1.3, but statically mentioned with the lib.
+ ** It is put here instead of amiga.c because make_func needs it as well,
+ ** and amiga.c includes references to signal.c and others.
+ */
+
+ LONG SystemTagList (UBYTE *command, /* struct TagItem * */ void *tags) {
+ return 0;
+ }
+
+ #endif
+
+ /*************************************************************************/
diff -c driver/hosts/amiga/signal.c:1.5 driver/hosts/amiga/signal.c:1.6
*** driver/hosts/amiga/signal.c:1.5 Sun Jan 9 22:09:22 1994
--- driver/hosts/amiga/signal.c Sun Jan 9 22:09:22 1994
***************
*** 26,31 ****
--- 26,33 ----
** 24-Feb-93 [lars] Small fix to support compilation for OS 1.3
** 28-Feb-93 [lars] Moved to DICE 2.07.53
** 09-Feb-93 [lars] Added check_signals() and default break handling.
+ ** 02-Jan-94 [lars] cleanup_timer() now able to clean up the internal
+ ** timer.
*/
#include <sys/types.h>
***************
*** 47,53 ****
#include <stdio.h>
#include "nsignal.h"
! #undef signal /* This macro is implemented here! */
/*-----------------------------------------------------------------------*/
--- 49,55 ----
#include <stdio.h>
#include "nsignal.h"
! #undef signal /* This macro is implemented here! */
/*-----------------------------------------------------------------------*/
***************
*** 102,108 ****
}
if (!(req = (struct timerequest *) CreateExtIO (timerport
! , sizeof(struct timerequest))
)) {
DeletePort(timerport);
*tr = NULL;
--- 104,110 ----
}
if (!(req = (struct timerequest *) CreateExtIO (timerport
! , sizeof(struct timerequest))
)) {
DeletePort(timerport);
*tr = NULL;
***************
*** 126,131 ****
--- 128,134 ----
** void cleanup_timer (struct timerequest **tr)
**
** Cleanup given timer <tr>.
+ ** If it is given as NULL, the internal 'treq' is cleaned up.
*/
__stkargs void cleanup_timer (struct timerequest **tr) {
***************
*** 133,143 ****
struct timerequest *tmp;
UBYTE pFlags;
if (*tr) {
tmp = *tr;
tp = tmp->tr_node.io_Message.mn_ReplyPort;
if (tp) {
! /* abort the current request */
pFlags = tp->mp_Flags; /* still needed for DeletePort */
tp->mp_Flags = PA_IGNORE;
AbortIO( (struct IORequest *) tmp );
--- 136,149 ----
struct timerequest *tmp;
UBYTE pFlags;
+ if (tr == NULL)
+ tr = &treq;
+
if (*tr) {
tmp = *tr;
tp = tmp->tr_node.io_Message.mn_ReplyPort;
if (tp) {
! /* abort the current request */
pFlags = tp->mp_Flags; /* still needed for DeletePort */
tp->mp_Flags = PA_IGNORE;
AbortIO( (struct IORequest *) tmp );
***************
*** 168,174 ****
if (!treq) {
printf("No handler installed !\n");
! return 0; /* Heartbeat won't work :+( */
}
tv.tv_secs = seconds;
--- 174,180 ----
if (!treq) {
printf("No handler installed !\n");
! return 0; /* Heartbeat won't work :+( */
}
tv.tv_secs = seconds;
***************
*** 219,267 ****
sigalrm = sys_signal_alarm;
if ((__sigfunc)handler == SIG_IGN) { /* remove SIGALRM handler */
! SetExcept(0L, sigalrm); /* Only sigalrm !! */
! sys_signal_alarm = 0;
! handler_alarm = NULL;
! cleanup_timer( &treq );
}
else { /* install handler */
! if (!setup_timer (UNIT_VBLANK, &treq)) {
! printf("Could not setup_timer\n");
! break; /* What else ?? */
! }
! sigalrm = 1L << (treq->tr_node.io_Message.mn_ReplyPort->mp_SigBit);
!
! this_task->tc_ExceptCode = (APTR) catch_exception;
! sys_signal_alarm = sigalrm;
! handler_alarm = handler;
! SetExcept (sigalrm, sigalrm);
! /* If we start treq, handler will be called */
}
break;
}
case SIGHUP : {
! ULONG sighup;
sighup = (((__sigfunc)handler == SIG_IGN) || ((__sigfunc)handler == SIG_DFL))
? 0 : EXT_SIGHUP;
! this_task->tc_ExceptCode = (APTR) catch_exception;
! sys_signal_hup = sighup;
! handler_hup = handler;
SetExcept(sighup, EXT_SIGHUP);
! break;
}
case SIGUSR1 : {
! ULONG sigusr;
sigusr = (((__sigfunc)handler == SIG_IGN) || ((__sigfunc)handler == SIG_DFL))
? 0 : EXT_SIGUSR;
! this_task->tc_ExceptCode = (APTR) catch_exception;
! sys_signal_usr = sigusr;
! handler_usr = handler;
SetExcept(sigusr, EXT_SIGUSR);
! break;
}
default: signal (signo, handler); break;
}
--- 225,273 ----
sigalrm = sys_signal_alarm;
if ((__sigfunc)handler == SIG_IGN) { /* remove SIGALRM handler */
! SetExcept(0L, sigalrm); /* Only sigalrm !! */
! sys_signal_alarm = 0;
! handler_alarm = NULL;
! cleanup_timer( &treq );
}
else { /* install handler */
! if (!setup_timer (UNIT_VBLANK, &treq)) {
! printf("Could not setup_timer\n");
! break; /* What else ?? */
! }
! sigalrm = 1L << (treq->tr_node.io_Message.mn_ReplyPort->mp_SigBit);
!
! this_task->tc_ExceptCode = (APTR) catch_exception;
! sys_signal_alarm = sigalrm;
! handler_alarm = handler;
! SetExcept (sigalrm, sigalrm);
! /* If we start treq, handler will be called */
}
break;
}
case SIGHUP : {
! ULONG sighup;
sighup = (((__sigfunc)handler == SIG_IGN) || ((__sigfunc)handler == SIG_DFL))
? 0 : EXT_SIGHUP;
! this_task->tc_ExceptCode = (APTR) catch_exception;
! sys_signal_hup = sighup;
! handler_hup = handler;
SetExcept(sighup, EXT_SIGHUP);
! break;
}
case SIGUSR1 : {
! ULONG sigusr;
sigusr = (((__sigfunc)handler == SIG_IGN) || ((__sigfunc)handler == SIG_DFL))
? 0 : EXT_SIGUSR;
! this_task->tc_ExceptCode = (APTR) catch_exception;
! sys_signal_usr = sigusr;
! handler_usr = handler;
SetExcept(sigusr, EXT_SIGUSR);
! break;
}
default: signal (signo, handler); break;
}