X-Git-Url: https://wimlib.net/git/?a=blobdiff_plain;f=src%2Fio.h;h=5ab46d22c5f8f42262976bb6b68658967568d2f9;hb=f46894fd897b721ac3128743147bdbad70d19414;hp=81144f7b333b597d4d02e3ed4bf1cf45cac5ae3e;hpb=885632f08c75c1d7bb5d25436231c78f6ad7e0c0;p=wimlib diff --git a/src/io.h b/src/io.h index 81144f7b..5ab46d22 100644 --- 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,6 +108,12 @@ 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) +{ + memset(p, 0, num_bytes); + return p + num_bytes; +} + static inline u8 *put_bytes(u8 *p, size_t num_bytes, const u8 *input) { memcpy(p, input, num_bytes);