memins man page on DragonFly

Man page or keyword search:  
man Server   44335 pages
apropos Keyword Search (all sections)
Output format
DragonFly logo
[printable version]

MEMINS(3)		     C Programmer's Manual		     MEMINS(3)

NAME
       memins - insert bytes at beginning of memory block

SYNOPSIS
       #include <publib.h>
       void *memins(void *tgt, size_t tgtsize, const void *src, size_t srcsize);

DESCRIPTION
       memins  inserts	srcsize	 bytes	from  src at the beginning of tgt, but
       moves the first tgtsize out of the way.	The source and	target	memory
       blocks must not overlap.

RETURN VALUE
       memins returns its first argument.

EXAMPLE
       To  insert  a new element at the ith position of an array, one might do
       the following.

	    int new, array[10];

	    memins(array+i, (10-i-1)*sizeof(array[0]), &new, sizeof(new));

       Please note that the above code carefully avoids the trap of moving the
       last element of the array past the end of the array.

SEE ALSO
       publib(3), strins(3)

AUTHOR
       Lars Wirzenius (lars.wirzenius@helsinki.fi)

Publib			     C Programmer's Manual		     MEMINS(3)
[top]

List of man pages available for DragonFly

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net