]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - wma_afh.c
string: Rename para_malloc() -> alloc().
[paraslash.git] / wma_afh.c
index 63e49677b0f1b85c13c17160a7b249531c1fbcd4..f2afae3bfda9430265c10d708be4f343f9b3f52a 100644 (file)
--- a/wma_afh.c
+++ b/wma_afh.c
@@ -195,7 +195,7 @@ static int wma_make_chunk_table(char *buf, size_t buf_size, uint32_t packet_size
        size_t ct_size = 250;
        int ret, count = 0, num_frames, num_superframes;
 
-       afhi->chunk_table = para_malloc(ct_size * sizeof(uint32_t));
+       afhi->chunk_table = alloc(ct_size * sizeof(uint32_t));
        afhi->chunk_table[0] = 0;
        afhi->chunk_table[1] = afhi->header_len;
 
@@ -334,7 +334,7 @@ static int convert_utf8_to_utf16(char *src, char **dst)
        /* even though src is in UTF-8, strlen() should DTRT */
        inbytes = inbytesleft = strlen(src);
        outbytes = outbytesleft = 4 * inbytes + 2; /* hope that's enough */
-       *dst = outbuf = para_malloc(outbytes);
+       *dst = outbuf = alloc(outbytes);
        sz = iconv(cd, ICONV_CAST &inbuf, &inbytesleft, &outbuf, &outbytesleft);
        if (sz == (size_t)-1) {
                ret = -ERRNO_TO_PARA_ERROR(errno);
@@ -411,7 +411,7 @@ static int make_cdo(struct taginfo *tags, const struct asf_object *cdo,
        result->size = 16 + 8 + 5 * 2 + title_bytes + artist_bytes
                + orig_cr_bytes + comment_bytes + orig_rating_bytes;
        PARA_DEBUG_LOG("cdo is %zu bytes\n", (size_t)result->size);
-       p = result->ptr = para_malloc(result->size);
+       p = result->ptr = alloc(result->size);
        memcpy(p, content_description_header, 16);
        p += 16;
        write_u64(p, result->size);
@@ -469,7 +469,7 @@ static int make_ecdo(struct taginfo *tags, struct asf_object *result)
        result->size += 2 + sizeof(album_tag_header) + 2 + 2 + 2 + album_bytes;
        result->size += 2 + sizeof(year_tag_header) + 2 + 2 + 2 + year_bytes;
 
-       p = result->ptr = para_malloc(result->size);
+       p = result->ptr = alloc(result->size);
        memcpy(p, extended_content_header, 16);
        p += 16;
        write_u64(p, result->size);
@@ -622,7 +622,7 @@ static int wma_rewrite_tags(const char *map, size_t mapsize,
        if (top.reserved2 != 2)
                return -E_NO_WMA;
        p++; /* objects start at p */
-       top.objects = para_malloc(top.num_objects * sizeof(struct asf_object));
+       top.objects = alloc(top.num_objects * sizeof(struct asf_object));
        ret = read_asf_objects(p, top.size - (p - map), top.num_objects,
                top.objects, &ton);
        if (ret < 0)