|
From: <has...@us...> - 2006-04-03 13:07:35
|
Revision: 1186 Author: hasseily Date: 2006-04-03 06:06:44 -0700 (Mon, 03 Apr 2006) ViewCVS: http://svn.sourceforge.net/frontierkernel/?rev=1186&view=rev Log Message: ----------- Got rid of all the fillchar() functions and replaced any call to them with a straightforward memset() call. Modified Paths: -------------- Frontier/trunk/Common/IOAToolkit/ioa.c Frontier/trunk/Common/IOAToolkit/ioa.h Frontier/trunk/Common/UserLandIACToolkit/landops.c Frontier/trunk/Common/headers/memory.h Frontier/trunk/Common/source/langhtml.c Frontier/trunk/Common/source/memory.c Frontier/trunk/Common/source/strings.c Frontier/trunk/Common/source/stringverbs.c Frontier/trunk/FrontierSDK/Toolkits/AppletToolkit/Headers/appletmemory.h Modified: Frontier/trunk/Common/IOAToolkit/ioa.c =================================================================== --- Frontier/trunk/Common/IOAToolkit/ioa.c 2006-04-02 22:47:42 UTC (rev 1185) +++ Frontier/trunk/Common/IOAToolkit/ioa.c 2006-04-03 13:06:44 UTC (rev 1186) @@ -62,28 +62,13 @@ static tyioaconfigrecord config; - -void IOAfillchar (void *pfill, long ctfill, char chfill) { - - /* - do a mass memory fill -- copy ctfill chfills at pfill. - */ - - char *p = pfill; - long ct = ctfill; - char ch = chfill; - - while (ct--) *p++ = (char) ch; /*tight loop*/ - } /*IOAfillchar*/ - - void IOAclearbytes (void *pclear, long ctclear) { /* fill memory with 0's. */ - IOAfillchar (pclear, ctclear, (char) 0); + memset(pclear, 0, ctclear); } /*IOAclearbytes*/ Modified: Frontier/trunk/Common/IOAToolkit/ioa.h =================================================================== --- Frontier/trunk/Common/IOAToolkit/ioa.h 2006-04-02 22:47:42 UTC (rev 1185) +++ Frontier/trunk/Common/IOAToolkit/ioa.h 2006-04-03 13:06:44 UTC (rev 1186) @@ -536,8 +536,6 @@ -void IOAfillchar (void *, long, char); - void IOAclearbytes (void *, long); short IOAmakemultiple (short, short); Modified: Frontier/trunk/Common/UserLandIACToolkit/landops.c =================================================================== --- Frontier/trunk/Common/UserLandIACToolkit/landops.c 2006-04-02 22:47:42 UTC (rev 1185) +++ Frontier/trunk/Common/UserLandIACToolkit/landops.c 2006-04-03 13:06:44 UTC (rev 1186) @@ -81,20 +81,6 @@ } } /*landmoveleft*/ - -static landfillchar (void *pfill, long ctfill, byte chfill) { - - /* - do a mass memory fill -- copy ctfill chfills at pfill. - */ - - register byte *p = pfill; - register long ct = ctfill; - register byte ch = chfill; - - while (ct--) *p++ = ch; /*tight loop*/ - } /*landfillchar*/ - landclearbytes (void *pclear, long ctclear) { @@ -102,7 +88,7 @@ fill memory with 0's. */ - landfillchar (pclear, ctclear, (byte) 0); + memset (pclear, 0, ctclear); } /*landclearbytes*/ Modified: Frontier/trunk/Common/headers/memory.h =================================================================== --- Frontier/trunk/Common/headers/memory.h 2006-04-02 22:47:42 UTC (rev 1185) +++ Frontier/trunk/Common/headers/memory.h 2006-04-03 13:06:44 UTC (rev 1186) @@ -181,8 +181,6 @@ extern void moveright (ptrvoid, ptrvoid, long); -extern void fillchar (ptrvoid, long, char); - extern void clearbytes (ptrvoid, long); extern void clearhandle (Handle); Modified: Frontier/trunk/Common/source/langhtml.c =================================================================== --- Frontier/trunk/Common/source/langhtml.c 2006-04-02 22:47:42 UTC (rev 1185) +++ Frontier/trunk/Common/source/langhtml.c 2006-04-03 13:06:44 UTC (rev 1186) @@ -1493,7 +1493,7 @@ setstringlength (bsdebug, 25); - fillchar (&bsdebug [1], 25, ' '); + memset(&bsdebug [1], ' ', 25); } for (i = 0; i < ct; i++) { Modified: Frontier/trunk/Common/source/memory.c =================================================================== --- Frontier/trunk/Common/source/memory.c 2006-04-02 22:47:42 UTC (rev 1185) +++ Frontier/trunk/Common/source/memory.c 2006-04-03 13:06:44 UTC (rev 1186) @@ -597,35 +597,14 @@ */ } /*moveright*/ - -void fillchar (ptrvoid pfill, long ctfill, char chfill) { - - /* - do a mass memory fill -- copy ctfill chfills at pfill. - */ - -#ifdef MACVERSION - register ptrbyte p = pfill; - register long ct = ctfill; - register char ch = chfill; - - while (--ct >= 0) - *p++ = (char) ch; /*tight loop*/ -#endif -#ifdef WIN95VERSION - FillMemory (pfill, ctfill, chfill); -#endif - } /*fillchar*/ - - void clearbytes (ptrvoid pclear, long ctclear) { /* fill memory with 0's. */ - fillchar (pclear, ctclear, (char) 0); + memset (pclear, 0, ctclear); } /*clearbytes*/ @@ -644,7 +623,7 @@ lockhandle (h); */ - fillchar (*h, size, (char) 0); + memset (*h, 0, size); /* unlockhandle (h); Modified: Frontier/trunk/Common/source/strings.c =================================================================== --- Frontier/trunk/Common/source/strings.c 2006-04-02 22:47:42 UTC (rev 1185) +++ Frontier/trunk/Common/source/strings.c 2006-04-03 13:06:44 UTC (rev 1186) @@ -1165,11 +1165,11 @@ setstringlength (bs, ct); - fillchar (stringbaseaddress (bs), (long) ct, ch); + memset (stringbaseaddress (bs), ch, (long) ct); /* bs [0] = ct; - fillchar (&bs [1], (long) ct, ch); + memset (&bs [1], ch, (long) ct); */ } /*filledstring*/ Modified: Frontier/trunk/Common/source/stringverbs.c =================================================================== --- Frontier/trunk/Common/source/stringverbs.c 2006-04-02 22:47:42 UTC (rev 1185) +++ Frontier/trunk/Common/source/stringverbs.c 2006-04-03 13:06:44 UTC (rev 1186) @@ -439,7 +439,7 @@ static void fillstring (ptrvoid pfill, long ctfill, bigstring bsfill) { /* - do a mass memory fill, like fillchar, but of a repeated string -- + do a mass memory fill, like memset, but of a repeated string -- copy ctfill bsfills at pfill. */ @@ -898,7 +898,7 @@ moveright (*h, *h + delta, currentlength); - fillchar (*h, delta, '0'); + memset (*h, '0', delta); } return (setheapvalue (h, stringvaluetype, v)); Modified: Frontier/trunk/FrontierSDK/Toolkits/AppletToolkit/Headers/appletmemory.h =================================================================== --- Frontier/trunk/FrontierSDK/Toolkits/AppletToolkit/Headers/appletmemory.h 2006-04-02 22:47:42 UTC (rev 1185) +++ Frontier/trunk/FrontierSDK/Toolkits/AppletToolkit/Headers/appletmemory.h 2006-04-03 13:06:44 UTC (rev 1186) @@ -38,8 +38,6 @@ void moveright (void *, void *, long); -void fillchar (void *, long, char); - void clearbytes (void *, long); boolean loadfromhandle (Handle, long *, long, void *); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |