]> wimlib.net Git - wimlib/blobdiff - src/io.h
get rid of make_output_dir() by extracting root dentry
[wimlib] / src / io.h
index 81144f7b333b597d4d02e3ed4bf1cf45cac5ae3e..dc49f5c08e92887f422e3fce1134dc16d5c4317d 100644 (file)
--- a/src/io.h
+++ b/src/io.h
@@ -3,23 +3,6 @@
  *
  * A few endianness-aware macros for reading and writing data from in-memory
  * buffers.
- *
- * Copyright (C) 2012 Eric Biggers
- *
- * wimlib - Library for working with WIM files 
- *
- * This library is free software; you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation; either version 2.1 of the License, or (at your option) any
- * later version.
- *
- * This library is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License along
- * with this library; if not, write to the Free Software Foundation, Inc., 59
- * Temple Place, Suite 330, Boston, MA 02111-1307 USA 
  */
 
 #ifndef _WIMLIB_IO_H
@@ -125,9 +108,13 @@ static inline const u8 *get_bytes(const u8 *p, size_t num_bytes, void *res)
        return p + num_bytes;
 }
 
+static inline u8 *put_zeroes(u8 *p, size_t num_bytes)
+{
+       return (u8*)memset(p, 0, num_bytes) + num_bytes;
+}
+
 static inline u8 *put_bytes(u8 *p, size_t num_bytes, const u8 *input)
 {
-       memcpy(p, input, num_bytes);
-       return p + num_bytes;
+       return (u8*)memcpy(p, input, num_bytes) + num_bytes;
 }
 #endif /* _WIMLIB_IO_H */