From 4a02a1a24d89ba4f8fdc2f61bdbad34062d03554 Mon Sep 17 00:00:00 2001 From: Nick Briggs Date: Sun, 14 Aug 2022 21:43:48 -0700 Subject: [PATCH] Rename lisp2c's LispStringLength to LispStringSimpleLength Avoid confusion with the LispStringLength definition in locfile.h This lisp2c function ONLY looks at the fillpointer for the length. --- inc/lisp2cdefs.h | 2 +- src/lisp2c.c | 4 ++-- src/mnxmeth.c | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/inc/lisp2cdefs.h b/inc/lisp2cdefs.h index 2454cad..aa83540 100644 --- a/inc/lisp2cdefs.h +++ b/inc/lisp2cdefs.h @@ -2,7 +2,7 @@ #define LISP2CDEFS_H 1 #include "lispemul.h" /* for LispPTR */ int LispStringP(LispPTR object); -int LispStringLength(LispPTR lispstring); +int LispStringSimpleLength(LispPTR lispstring); void LispStringToCStr(LispPTR lispstring, char *cstring); int LispIntToCInt(LispPTR lispint); LispPTR CIntToLispInt(int cint); diff --git a/src/lisp2c.c b/src/lisp2c.c index e924946..0fd37b7 100644 --- a/src/lisp2c.c +++ b/src/lisp2c.c @@ -17,7 +17,7 @@ #include "adr68k.h" // for Addr68k_from_LADDR, LADDR_from_68k #include "commondefs.h" // for error #include "emlglob.h" -#include "lisp2cdefs.h" // for CIntToLispInt, LispIntToCInt, LispStringLength +#include "lisp2cdefs.h" // for CIntToLispInt, LispIntToCInt, LispStringSimpleLength #include "lispemul.h" // for LispPTR #include "lispmap.h" // for S_NEGATIVE, S_POSITIVE #include "lspglob.h" @@ -31,7 +31,7 @@ int LispStringP(LispPTR object) { return ((type == THIN_CHAR_TYPENUMBER) || (type == FAT_CHAR_TYPENUMBER)); } -int LispStringLength(LispPTR lispstring) { +int LispStringSimpleLength(LispPTR lispstring) { OneDArray *arrayp; arrayp = (OneDArray *)(Addr68k_from_LADDR(lispstring)); diff --git a/src/mnxmeth.c b/src/mnxmeth.c index 23deb80..922db21 100644 --- a/src/mnxmeth.c +++ b/src/mnxmeth.c @@ -146,7 +146,7 @@ char *gettitlestring(LispPTR medleywin) if (((MedleyWindow)Cptr(medleywin))->WTITLE == NIL) titlestring = NULL; else { - strlen = LispStringLength(((MedleyWindow)Cptr(medleywin))->WTITLE); + strlen = LispStringSimpleLength(((MedleyWindow)Cptr(medleywin))->WTITLE); titlestring = (char *)malloc(strlen + 1); LispStringToCStr(((MedleyWindow)Cptr(medleywin))->WTITLE, titlestring); } @@ -200,7 +200,7 @@ void setlineattributes(Display *display, DspInterface dspif, WindowInterface wif } if (mdash != NIL) { - l = LispStringLength(mdash); + l = LispStringSimpleLength(mdash); dash_list = (unsigned char *)malloc(l + 1); LispStringToCStr(mdash, dash_list); @@ -2797,7 +2797,7 @@ InitDsp(LispArgs args) /* arg[0] = LispPTR to MedleyScreen */ /* if NATIVE_INFO has a string use it for the hostname */ /* else use the environment var DISPLAY or "unix:0.0" */ if (LispStringP(SCREEN->NATIVE_INFO)) { - strlen = LispStringLength(SCREEN->NATIVE_INFO); + strlen = LispStringSimpleLength(SCREEN->NATIVE_INFO); tmpstring = (char *)alloca(strlen + 1); LispStringToCStr(SCREEN->NATIVE_INFO, tmpstring); dspif->handle =