180016Sobrien/*
280016Sobrien * Copyright (c) 2004-2016 Maxim Sobolev <sobomax@FreeBSD.org>
380016Sobrien * All rights reserved.
480016Sobrien *
580016Sobrien * Redistribution and use in source and binary forms, with or without
680016Sobrien * modification, are permitted provided that the following conditions
780016Sobrien * are met:
880016Sobrien * 1. Redistributions of source code must retain the above copyright
980016Sobrien *    notice, this list of conditions and the following disclaimer.
1080016Sobrien * 2. Redistributions in binary form must reproduce the above copyright
1180016Sobrien *    notice, this list of conditions and the following disclaimer in the
1280016Sobrien *    documentation and/or other materials provided with the distribution.
1380016Sobrien *
1480016Sobrien * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
1580016Sobrien * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1680016Sobrien * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1780016Sobrien * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
1880016Sobrien * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1980016Sobrien * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2080016Sobrien * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2180016Sobrien * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2280016Sobrien * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2380016Sobrien * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2480016Sobrien * SUCH DAMAGE.
2580016Sobrien */
2680016Sobrien
2780016Sobrien#include <sys/cdefs.h>
2880016Sobrien__FBSDID("$FreeBSD$");
2980016Sobrien
3080016Sobrien#include <stdint.h>
3180016Sobrien#include <stdlib.h>
3280016Sobrien
3380016Sobrien#include "mkuzip.h"
3480016Sobrien#include "mkuz_blk.h"
3580016Sobrien
3680016Sobrienstruct mkuz_blk *
3780016Sobrienmkuz_blk_ctor(size_t blen)
3869159Sobrien{
3969159Sobrien    struct mkuz_blk *rval;
4069159Sobrien
4169159Sobrien    rval = mkuz_safe_zmalloc(sizeof(struct mkuz_blk) + blen);
4269159Sobrien    rval->alen = blen;
4369159Sobrien    rval->br_offset = OFFSET_UNDEF;
4469159Sobrien    return (rval);
4569159Sobrien}
4669159Sobrien