|
|
1.1 ! root 1: ! 2: ! 3: memmove() String Function memmove() ! 4: ! 5: ! 6: ! 7: ! 8: Copy region of memory into area it overlaps ! 9: ! 10: #include <string.h> ! 11: cchhaarr *mmeemmmmoovvee(_r_e_g_i_o_n_1, _r_e_g_i_o_n_2, _c_o_u_n_t); ! 12: cchhaarr *_r_e_g_i_o_n_1, cchhaarr *_r_e_g_i_o_n_2, uunnssiiggnneedd iinntt _c_o_u_n_t; ! 13: ! 14: memmove copies count characters from region2 into region1. ! 15: Unlike memcpy, memmove correctly copies the region pointed to by ! 16: region2 into that pointed by region1 even if they overlap. To ! 17: ``correctly copy'' means that the overlap does not propagate, not ! 18: that the moved data stay intact. Unlike the string-copying ! 19: routines strcpy and strncpy, memmove continues to copy even if it ! 20: encounters a null character. ! 21: ! 22: memmove returns region1. ! 23: ! 24: ***** See Also ***** ! 25: ! 26: string functions, string.h ! 27: ! 28: ***** Notes ***** ! 29: ! 30: region1 should point to enough reserved memory to hold the con- ! 31: tents of region2. Otherwise, code or data will be overwritten. ! 32: ! 33: ! 34: ! 35: ! 36: ! 37: ! 38: ! 39: ! 40: ! 41: ! 42: ! 43: ! 44: ! 45: ! 46: ! 47: ! 48: ! 49: ! 50: ! 51: ! 52: ! 53: ! 54: ! 55: ! 56: ! 57: ! 58: ! 59: ! 60: ! 61: ! 62: ! 63: ! 64: COHERENT Lexicon Page 1 ! 65: ! 66:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.