⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 memory.3

📁 <B>Digital的Unix操作系统VAX 4.2源码</B>
💻 3
字号:
.\" SCCSID: @(#)memory.3	8.1	9/11/90.TH memory 3.SH Namememccpy, memchr, memcmp, memcpy, memmove, memset \- memory operations.SH Syntax.nf.B #include <string.h> .PP.B void *memccpy (\fIs1, s2, c, n\fP).B void *\fIs1\fP, *\fIs2\fP;.B int \fIc\fP;.B size_t \fIn\fP;.PP.B void *memchr (\fIs, c, n\fP).B void *\fIs\fP;.B int \fIc\fP;.B size_t \fIn\fP;.PP.B int memcmp (\fIs1, s2, n\fP).B void *\fIs1\fP, *\fIs2\fP;.B size_t \fIn\fP; .PP.B void *memcpy (\fIs1, s2, n\fP).B void *\fIs1\fP, *\fIs2\fP;.B size_t \fIn\fP; .PP.B void *memset (\fIs, c, n\fP).B void *\fIs\fP;.B int \fIc\fP;.B size_t \fIn\fP;.PP.B void *memmove (\fIs1, s2, n\fP).B void *\fIs1, *s2\fP;.B size_t \fIn\fP;.fi.SH Description.NXR "memory keyword".NXR "memccpy subroutine".NXR "memchr subroutine".NXR "memcmp subroutine".NXR "memcpy subroutine".NXR "memmove subroutine".NXR "memset subroutine".NXR "memory" "operations".NXR "memory area" "defined"These functions operate efficiently on memory areas(arrays of characters bounded by a count, not terminated by a null character).They do not check for the overflow of any receiving memory area..PPThe.PN memccpysubroutinecopies characters from memory area.I s2\^into.IR s1 ,stopping after the first occurrence of character.I c\^has been copied, or after.I n\^characters have been copied, whichever comes first.It returns a pointer to the character afterthe copy of.I c\^in.IR s1 ,or aNULLpointer if.I c\^was not found in the first.I n\^characters of.IR s2 ..PPThe.PN memchrsubroutinereturns a pointer to the firstoccurrence of character .I c\^in the first.I n\^characters of memory area.IR s ,or aNULLpointer if.I c\^does not occur..PPThe.PN memcmpsubroutine compares its arguments, looking at the first.I n\^characters only, and returns an integerless than, equal to, or greater than 0,according as.I s1\^is lexicographically less than, equal to, orgreater than.IR s2 ..PPThe.PN memcpysubroutine copies.I n\^characters from memory area.I s2\^to.IR s1 .It returns.IR s1 ..PPThe.PN memmovesubroutine is like.PN memcpy,except that if s1 and s2 specify overlapping areas, .PN memmoveworks as if an intermediate buffer is used. .PPThe.PN memsetsubroutinesets the first.I n\^characters in memory area.I s\^to the value of character.IR c .It returns.IR s ..SH Restrictions.NXR "memccpy subroutine" "restrictions"The.PN memcmpsubroutine uses native character comparison, which is signedon PDP\-11s,unsigned on other machines..PPCharacter movement is performed differently indifferent implementations of .PN memccpyand.PN memcpy .Thus overlapping moves, using these subroutines, may yield unpredictable results.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -