1 /* |
1 /* |
2 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. |
2 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. |
3 * |
3 * |
4 * Copyright 2015 Olaf Wintermann. All rights reserved. |
4 * Copyright 2016 Olaf Wintermann. All rights reserved. |
5 * |
5 * |
6 * Redistribution and use in source and binary forms, with or without |
6 * Redistribution and use in source and binary forms, with or without |
7 * modification, are permitted provided that the following conditions are met: |
7 * modification, are permitted provided that the following conditions are met: |
8 * |
8 * |
9 * 1. Redistributions of source code must retain the above copyright |
9 * 1. Redistributions of source code must retain the above copyright |
46 void *cpy = malloc(k); |
46 void *cpy = malloc(k); |
47 memcpy(cpy, m, k); |
47 memcpy(cpy, m, k); |
48 return cpy; |
48 return cpy; |
49 } |
49 } |
50 |
50 |
51 size_t ucx_stream_copy(void *src, void *dest, read_func readfnc, |
51 size_t ucx_stream_bncopy(void *src, void *dest, read_func readfnc, |
52 write_func writefnc, char* buf, size_t bufsize, size_t n) { |
52 write_func writefnc, char* buf, size_t bufsize, size_t n) { |
53 if(n == 0 || bufsize == 0) { |
53 if(n == 0 || bufsize == 0) { |
54 return 0; |
54 return 0; |
55 } |
55 } |
56 |
56 |