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

📄 me

📁 Algorithms for Image Processing and Computer Vision Source Code
💻
字号:
@c ----------------------------------------------------------------------
@node memccpy, memory
@heading @code{memccpy}
@subheading Syntax

@example
#include <string.h>

void *memccpy(void *dest, const void *source, int ch, size_t num);
@end example

@subheading Description

This function copies at most @var{num} bytes from @var{source} to
@var{dest}, stopping if the character @var{ch} is copied. 

@subheading Return Value

A pointer to the character after @var{ch}, if it was found, else
@code{NULL}. 

@subheading Example

@example
char buf[20];
memccpy(buf, "hello!", 'l', 20);
@end example

@c ----------------------------------------------------------------------
@node memchr, memory
@heading @code{memchr}
@subheading Syntax

@example
void *memchr(const void *string, int ch, size_t num);
@end example

@subheading Description

This function searches @var{num} bytes starting at @var{string}, looking
for the first occurence of @var{ch}. 

@subheading Return Value

A pointer to the first match, or @code{NULL} if it wasn't found.

@subheading Example

@example
if (memchr(path, '/', strlen(path))
  do_slash();
@end example

@c ----------------------------------------------------------------------
@node memcmp, memory
@heading @code{memcmp}
@subheading Syntax

@example
#include <string.h>

int memcmp(const void *s1, const void *s2, size_t num);
@end example

@subheading Description

This function compares two regions of memory, at @var{s1} and @var{s2},
for @var{num} bytes. 

@subheading Return Value

@table @asis

@item zero

s1 == s2

@item positive

s1 > s2

@item negative

s1 < s2

@end table

@c ----------------------------------------------------------------------
@node _memcpy, memory
@heading @code{_memcpy}
@subheading Syntax

@example
#include <string.h>

void *_memcpy(void *dest, const void *src, int num);
@end example

@subheading Description

This function is just like @code{memcpy} (@pxref{memcpy}), but it doesn't
use the i386 @code{movs} opcode, in case the source and destination are
on memory pages that can't reside in the system at the same time.  This
is used primarily for screen to screen copies of the graphics screen, in
case the two regions are in different graphics windows. 

@subheading Return Value

@var{dest}

@c ----------------------------------------------------------------------
@node memcpy, memory
@heading @code{memcpy}
@subheading Syntax

@example
#include <string.h>

void *memcpy(void *dest, const void *src, int num);
@end example

@subheading Description

This function copies @var{num} bytes from @var{source} to @var{dest}. 

@subheading Return Value

@var{dest}

@subheading Example

@example
memcpy(buffer, temp_buffer, BUF_MAX);
@end example

@c ----------------------------------------------------------------------
@node memmove, memory
@heading @code{memmove}
@subheading Syntax

@example
#include <string.h>

void *memmove(void *dest, const void *source, int num);
@end example

@subheading Description

This function copies @var{num} bytes from @var{source} to @var{dest}. 
The copy is done in such a way that if the two regions overlap, the
source is always read before that byte is changed by writing to the
destination. 

@subheading Return Value

@var{dest}

@subheading Example

@example
memmove(buf+1, buf, 99);
memmove(buf, buf+1, 99);
@end example

@c ----------------------------------------------------------------------
@node memset, memory
@heading @code{memset}
@subheading Syntax

@example
#include <string.h>

void *memset(void *buffer, int ch, size_t num);
@end example

@subheading Description

This function stores @var{num} copies of @var{ch}, starting at
@var{buffer}.  This is often used to initialize objects to a known
value. 

@subheading Return Value

@var{buffer}

@subheading Example

@example
struct tm t;
memset(&t, 0, sizeof(t));
@end example

⌨️ 快捷键说明

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