| 1545 | } |
| 1546 | |
| 1547 | void str_append(char *dst, const char *src, int dst_size) |
| 1548 | { |
| 1549 | int s = strlen(dst); |
| 1550 | int i = 0; |
| 1551 | while(s < dst_size) |
| 1552 | { |
| 1553 | dst[s] = src[i]; |
| 1554 | if(!src[i]) /* check for null termination */ |
| 1555 | break; |
| 1556 | s++; |
| 1557 | i++; |
| 1558 | } |
| 1559 | |
| 1560 | dst[dst_size-1] = 0; /* assure null termination */ |
| 1561 | } |
| 1562 | |
| 1563 | void str_copy(char *dst, const char *src, int dst_size) |
| 1564 | { |