Mail Archives: djgpp/1997/09/08/10:03:35
From: | Vik Heyndrickx <Vik DOT Heyndrickx AT rug DOT ac DOT be>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Q: argument order in memory copy routine
|
Date: | Mon, 08 Sep 1997 15:06:12 +0200
|
Organization: | University of Ghent, Belgium
|
Lines: | 27
|
Message-ID: | <3413F844.13A4@rug.ac.be>
|
NNTP-Posting-Host: | eduserv1.rug.ac.be
|
Mime-Version: | 1.0
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Hi
I've a hypothetical question:
Suppose there was a couple of far memory copy functions to be added to
the library functions, in what order should I put the parameters?
There is
memcpy (dst, src, len)
memmove (dst, src, len)
And there is
movedata (src_sel, src_ofs, dst_sel, dst_ofs, len)
And there is
dosmemput (src_buf, len, ofs)
and
dosmemget (ofs, len, dst_buf)
It seems it's impossible to be consistent with those. But following the
oldest one and the most standard one, i.e. memcpy seems the best. Any
other opinions?
? farmemget (void *buf, src_sel, src_ofs, len)
? farmemput (src_sel, src_ofs, void *buf, len)
--
+----------------+
| Vik Heyndrickx |
+----------------+
- Raw text -