src/archiver_grp.c
author Ryan C. Gordon <icculus@icculus.org>
Mon, 06 Sep 2010 02:50:29 -0400
changeset 1128 067d8e76261e
parent 1125 bcff76dbd9fd
child 1129 d81afe4b0a97
permissions -rw-r--r--
Moved most the cut-and-paste between simple archivers to one file.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
24
b050804123a3 Initial add. Implemented, buggy, but not crashing.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     1
/*
b050804123a3 Initial add. Implemented, buggy, but not crashing.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     2
 * GRP support routines for PhysicsFS.
b050804123a3 Initial add. Implemented, buggy, but not crashing.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     3
 *
b050804123a3 Initial add. Implemented, buggy, but not crashing.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     4
 * This driver handles BUILD engine archives ("groupfiles"). This format
b050804123a3 Initial add. Implemented, buggy, but not crashing.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     5
 *  (but not this driver) was put together by Ken Silverman.
b050804123a3 Initial add. Implemented, buggy, but not crashing.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     6
 *
b050804123a3 Initial add. Implemented, buggy, but not crashing.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     7
 * The format is simple enough. In Ken's words:
b050804123a3 Initial add. Implemented, buggy, but not crashing.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     8
 *
b050804123a3 Initial add. Implemented, buggy, but not crashing.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     9
 *    What's the .GRP file format?
b050804123a3 Initial add. Implemented, buggy, but not crashing.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    10
 *
b050804123a3 Initial add. Implemented, buggy, but not crashing.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    11
 *     The ".grp" file format is just a collection of a lot of files stored
b050804123a3 Initial add. Implemented, buggy, but not crashing.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    12
 *     into 1 big one. I tried to make the format as simple as possible: The
b050804123a3 Initial add. Implemented, buggy, but not crashing.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    13
 *     first 12 bytes contains my name, "KenSilverman". The next 4 bytes is
b050804123a3 Initial add. Implemented, buggy, but not crashing.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    14
 *     the number of files that were compacted into the group file. Then for
b050804123a3 Initial add. Implemented, buggy, but not crashing.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    15
 *     each file, there is a 16 byte structure, where the first 12 bytes are
b050804123a3 Initial add. Implemented, buggy, but not crashing.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    16
 *     the filename, and the last 4 bytes are the file's size. The rest of
b050804123a3 Initial add. Implemented, buggy, but not crashing.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    17
 *     the group file is just the raw data packed one after the other in the
b050804123a3 Initial add. Implemented, buggy, but not crashing.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    18
 *     same order as the list of files.
b050804123a3 Initial add. Implemented, buggy, but not crashing.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    19
 *
b050804123a3 Initial add. Implemented, buggy, but not crashing.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    20
 * (That info is from http://www.advsys.net/ken/build.htm ...)
b050804123a3 Initial add. Implemented, buggy, but not crashing.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    21
 *
809
116b8fe30371 Renamed LICENSE to LICENSE.txt
Ryan C. Gordon <icculus@icculus.org>
parents: 808
diff changeset
    22
 * Please see the file LICENSE.txt in the source's root directory.
24
b050804123a3 Initial add. Implemented, buggy, but not crashing.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    23
 *
b050804123a3 Initial add. Implemented, buggy, but not crashing.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    24
 *  This file written by Ryan C. Gordon.
b050804123a3 Initial add. Implemented, buggy, but not crashing.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    25
 */
b050804123a3 Initial add. Implemented, buggy, but not crashing.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    26
214
19846c18071b Initial autoconf support.
Ryan C. Gordon <icculus@icculus.org>
parents: 194
diff changeset
    27
#if (defined PHYSFS_SUPPORTS_GRP)
19846c18071b Initial autoconf support.
Ryan C. Gordon <icculus@icculus.org>
parents: 194
diff changeset
    28
24
b050804123a3 Initial add. Implemented, buggy, but not crashing.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    29
#include <stdio.h>
b050804123a3 Initial add. Implemented, buggy, but not crashing.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    30
#include <stdlib.h>
b050804123a3 Initial add. Implemented, buggy, but not crashing.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    31
#include <string.h>
b050804123a3 Initial add. Implemented, buggy, but not crashing.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    32
#include "physfs.h"
b050804123a3 Initial add. Implemented, buggy, but not crashing.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    33
b050804123a3 Initial add. Implemented, buggy, but not crashing.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    34
#define __PHYSICSFS_INTERNAL__
b050804123a3 Initial add. Implemented, buggy, but not crashing.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    35
#include "physfs_internal.h"
b050804123a3 Initial add. Implemented, buggy, but not crashing.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    36
1118
2e09fc635fdd Abstracted file i/o into PHYSFS_Io interface.
Ryan C. Gordon <icculus@icculus.org>
parents: 1115
diff changeset
    37
static inline int readAll(PHYSFS_Io *io, void *buf, const PHYSFS_uint64 len)
1098
4e86cec1143f Moved all the file i/o from stdio-style to POSIX-style.
Ryan C. Gordon <icculus@icculus.org>
parents: 1054
diff changeset
    38
{
1118
2e09fc635fdd Abstracted file i/o into PHYSFS_Io interface.
Ryan C. Gordon <icculus@icculus.org>
parents: 1115
diff changeset
    39
    return (io->read(io, buf, len) == len);
1098
4e86cec1143f Moved all the file i/o from stdio-style to POSIX-style.
Ryan C. Gordon <icculus@icculus.org>
parents: 1054
diff changeset
    40
} /* readAll */
4e86cec1143f Moved all the file i/o from stdio-style to POSIX-style.
Ryan C. Gordon <icculus@icculus.org>
parents: 1054
diff changeset
    41
1128
067d8e76261e Moved most the cut-and-paste between simple archivers to one file.
Ryan C. Gordon <icculus@icculus.org>
parents: 1125
diff changeset
    42
static UNPKentry *grpLoadEntries(PHYSFS_Io *io, PHYSFS_uint32 fileCount)
467
99664d9842cb Bunch of tedious corrections, optimizations, and cleanups.
Ryan C. Gordon <icculus@icculus.org>
parents: 464
diff changeset
    43
{
1128
067d8e76261e Moved most the cut-and-paste between simple archivers to one file.
Ryan C. Gordon <icculus@icculus.org>
parents: 1125
diff changeset
    44
    PHYSFS_uint32 location = 16;  /* sizeof sig. */
067d8e76261e Moved most the cut-and-paste between simple archivers to one file.
Ryan C. Gordon <icculus@icculus.org>
parents: 1125
diff changeset
    45
    UNPKentry *entries = NULL;
067d8e76261e Moved most the cut-and-paste between simple archivers to one file.
Ryan C. Gordon <icculus@icculus.org>
parents: 1125
diff changeset
    46
    UNPKentry *entry = NULL;
067d8e76261e Moved most the cut-and-paste between simple archivers to one file.
Ryan C. Gordon <icculus@icculus.org>
parents: 1125
diff changeset
    47
    char *ptr = NULL;
24
b050804123a3 Initial add. Implemented, buggy, but not crashing.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    48
1128
067d8e76261e Moved most the cut-and-paste between simple archivers to one file.
Ryan C. Gordon <icculus@icculus.org>
parents: 1125
diff changeset
    49
    entries = (UNPKentry *) allocator.Malloc(sizeof (UNPKentry) * fileCount);
067d8e76261e Moved most the cut-and-paste between simple archivers to one file.
Ryan C. Gordon <icculus@icculus.org>
parents: 1125
diff changeset
    50
    BAIL_IF_MACRO(entries == NULL, ERR_OUT_OF_MEMORY, NULL);
364
51da162c76f7 Major overhauls. More efficient, robust, and bug-free.
Ryan C. Gordon <icculus@icculus.org>
parents: 335
diff changeset
    51
370
da631e118455 Fixed entry loading.
Ryan C. Gordon <icculus@icculus.org>
parents: 364
diff changeset
    52
    location += (16 * fileCount);
da631e118455 Fixed entry loading.
Ryan C. Gordon <icculus@icculus.org>
parents: 364
diff changeset
    53
1128
067d8e76261e Moved most the cut-and-paste between simple archivers to one file.
Ryan C. Gordon <icculus@icculus.org>
parents: 1125
diff changeset
    54
    for (entry = entries; fileCount > 0; fileCount--, entry++)
364
51da162c76f7 Major overhauls. More efficient, robust, and bug-free.
Ryan C. Gordon <icculus@icculus.org>
parents: 335
diff changeset
    55
    {
1128
067d8e76261e Moved most the cut-and-paste between simple archivers to one file.
Ryan C. Gordon <icculus@icculus.org>
parents: 1125
diff changeset
    56
        GOTO_IF_MACRO(!readAll(io, &entry->name, 12), NULL, grpLoad_failed);
067d8e76261e Moved most the cut-and-paste between simple archivers to one file.
Ryan C. Gordon <icculus@icculus.org>
parents: 1125
diff changeset
    57
        GOTO_IF_MACRO(!readAll(io, &entry->size, 4), NULL, grpLoad_failed);
364
51da162c76f7 Major overhauls. More efficient, robust, and bug-free.
Ryan C. Gordon <icculus@icculus.org>
parents: 335
diff changeset
    58
        entry->name[12] = '\0';  /* name isn't null-terminated in file. */
51da162c76f7 Major overhauls. More efficient, robust, and bug-free.
Ryan C. Gordon <icculus@icculus.org>
parents: 335
diff changeset
    59
        if ((ptr = strchr(entry->name, ' ')) != NULL)
51da162c76f7 Major overhauls. More efficient, robust, and bug-free.
Ryan C. Gordon <icculus@icculus.org>
parents: 335
diff changeset
    60
            *ptr = '\0';  /* trim extra spaces. */
51da162c76f7 Major overhauls. More efficient, robust, and bug-free.
Ryan C. Gordon <icculus@icculus.org>
parents: 335
diff changeset
    61
51da162c76f7 Major overhauls. More efficient, robust, and bug-free.
Ryan C. Gordon <icculus@icculus.org>
parents: 335
diff changeset
    62
        entry->size = PHYSFS_swapULE32(entry->size);
51da162c76f7 Major overhauls. More efficient, robust, and bug-free.
Ryan C. Gordon <icculus@icculus.org>
parents: 335
diff changeset
    63
        entry->startPos = location;
370
da631e118455 Fixed entry loading.
Ryan C. Gordon <icculus@icculus.org>
parents: 364
diff changeset
    64
        location += entry->size;
364
51da162c76f7 Major overhauls. More efficient, robust, and bug-free.
Ryan C. Gordon <icculus@icculus.org>
parents: 335
diff changeset
    65
    } /* for */
51da162c76f7 Major overhauls. More efficient, robust, and bug-free.
Ryan C. Gordon <icculus@icculus.org>
parents: 335
diff changeset
    66
1128
067d8e76261e Moved most the cut-and-paste between simple archivers to one file.
Ryan C. Gordon <icculus@icculus.org>
parents: 1125
diff changeset
    67
    return entries;
067d8e76261e Moved most the cut-and-paste between simple archivers to one file.
Ryan C. Gordon <icculus@icculus.org>
parents: 1125
diff changeset
    68
067d8e76261e Moved most the cut-and-paste between simple archivers to one file.
Ryan C. Gordon <icculus@icculus.org>
parents: 1125
diff changeset
    69
grpLoad_failed:
067d8e76261e Moved most the cut-and-paste between simple archivers to one file.
Ryan C. Gordon <icculus@icculus.org>
parents: 1125
diff changeset
    70
    allocator.Free(entries);
067d8e76261e Moved most the cut-and-paste between simple archivers to one file.
Ryan C. Gordon <icculus@icculus.org>
parents: 1125
diff changeset
    71
    return NULL;
067d8e76261e Moved most the cut-and-paste between simple archivers to one file.
Ryan C. Gordon <icculus@icculus.org>
parents: 1125
diff changeset
    72
} /* grpLoadEntries */
364
51da162c76f7 Major overhauls. More efficient, robust, and bug-free.
Ryan C. Gordon <icculus@icculus.org>
parents: 335
diff changeset
    73
51da162c76f7 Major overhauls. More efficient, robust, and bug-free.
Ryan C. Gordon <icculus@icculus.org>
parents: 335
diff changeset
    74
1118
2e09fc635fdd Abstracted file i/o into PHYSFS_Io interface.
Ryan C. Gordon <icculus@icculus.org>
parents: 1115
diff changeset
    75
static void *GRP_openArchive(PHYSFS_Io *io, const char *name, int forWriting)
364
51da162c76f7 Major overhauls. More efficient, robust, and bug-free.
Ryan C. Gordon <icculus@icculus.org>
parents: 335
diff changeset
    76
{
1118
2e09fc635fdd Abstracted file i/o into PHYSFS_Io interface.
Ryan C. Gordon <icculus@icculus.org>
parents: 1115
diff changeset
    77
    PHYSFS_uint8 buf[12];
1128
067d8e76261e Moved most the cut-and-paste between simple archivers to one file.
Ryan C. Gordon <icculus@icculus.org>
parents: 1125
diff changeset
    78
    PHYSFS_uint32 entryCount = 0;
067d8e76261e Moved most the cut-and-paste between simple archivers to one file.
Ryan C. Gordon <icculus@icculus.org>
parents: 1125
diff changeset
    79
    UNPKentry *entries = NULL;
1118
2e09fc635fdd Abstracted file i/o into PHYSFS_Io interface.
Ryan C. Gordon <icculus@icculus.org>
parents: 1115
diff changeset
    80
2e09fc635fdd Abstracted file i/o into PHYSFS_Io interface.
Ryan C. Gordon <icculus@icculus.org>
parents: 1115
diff changeset
    81
    assert(io != NULL);  /* shouldn't ever happen. */
24
b050804123a3 Initial add. Implemented, buggy, but not crashing.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    82
1118
2e09fc635fdd Abstracted file i/o into PHYSFS_Io interface.
Ryan C. Gordon <icculus@icculus.org>
parents: 1115
diff changeset
    83
    BAIL_IF_MACRO(forWriting, ERR_ARC_IS_READ_ONLY, 0);
139
616420dc210c Converted to file i/o abstraction, removed race condition.
Ryan C. Gordon <icculus@icculus.org>
parents: 132
diff changeset
    84
1118
2e09fc635fdd Abstracted file i/o into PHYSFS_Io interface.
Ryan C. Gordon <icculus@icculus.org>
parents: 1115
diff changeset
    85
    BAIL_IF_MACRO(!readAll(io, buf, sizeof (buf)), NULL, NULL);
2e09fc635fdd Abstracted file i/o into PHYSFS_Io interface.
Ryan C. Gordon <icculus@icculus.org>
parents: 1115
diff changeset
    86
    if (memcmp(buf, "KenSilverman", sizeof (buf)) != 0)
1128
067d8e76261e Moved most the cut-and-paste between simple archivers to one file.
Ryan C. Gordon <icculus@icculus.org>
parents: 1125
diff changeset
    87
        BAIL_MACRO(ERR_NOT_AN_ARCHIVE, NULL);
24
b050804123a3 Initial add. Implemented, buggy, but not crashing.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    88
1128
067d8e76261e Moved most the cut-and-paste between simple archivers to one file.
Ryan C. Gordon <icculus@icculus.org>
parents: 1125
diff changeset
    89
    BAIL_IF_MACRO(!readAll(io, &entryCount, sizeof (entryCount)), NULL, NULL);
067d8e76261e Moved most the cut-and-paste between simple archivers to one file.
Ryan C. Gordon <icculus@icculus.org>
parents: 1125
diff changeset
    90
    entryCount = PHYSFS_swapULE32(entryCount);
24
b050804123a3 Initial add. Implemented, buggy, but not crashing.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    91
1128
067d8e76261e Moved most the cut-and-paste between simple archivers to one file.
Ryan C. Gordon <icculus@icculus.org>
parents: 1125
diff changeset
    92
    entries = grpLoadEntries(io, entryCount);
067d8e76261e Moved most the cut-and-paste between simple archivers to one file.
Ryan C. Gordon <icculus@icculus.org>
parents: 1125
diff changeset
    93
    BAIL_IF_MACRO(entries == NULL, NULL, NULL);
067d8e76261e Moved most the cut-and-paste between simple archivers to one file.
Ryan C. Gordon <icculus@icculus.org>
parents: 1125
diff changeset
    94
    return UNPK_openArchive(io, entries, entryCount);
067d8e76261e Moved most the cut-and-paste between simple archivers to one file.
Ryan C. Gordon <icculus@icculus.org>
parents: 1125
diff changeset
    95
} /* GRP_openArchive */
1054
57f4af811ffb THIS is Christoph's PHYSFS_stat() work.
Ryan C. Gordon <icculus@icculus.org>
parents: 1053
diff changeset
    96
57f4af811ffb THIS is Christoph's PHYSFS_stat() work.
Ryan C. Gordon <icculus@icculus.org>
parents: 1053
diff changeset
    97
658
1981818c6170 Removed all the forward declaration cruft from the archivers.
Ryan C. Gordon <icculus@icculus.org>
parents: 657
diff changeset
    98
const PHYSFS_ArchiveInfo __PHYSFS_ArchiveInfo_GRP =
1981818c6170 Removed all the forward declaration cruft from the archivers.
Ryan C. Gordon <icculus@icculus.org>
parents: 657
diff changeset
    99
{
1981818c6170 Removed all the forward declaration cruft from the archivers.
Ryan C. Gordon <icculus@icculus.org>
parents: 657
diff changeset
   100
    "GRP",
1981818c6170 Removed all the forward declaration cruft from the archivers.
Ryan C. Gordon <icculus@icculus.org>
parents: 657
diff changeset
   101
    GRP_ARCHIVE_DESCRIPTION,
767
db29bf06d171 Changed my email address.
Ryan C. Gordon <icculus@icculus.org>
parents: 754
diff changeset
   102
    "Ryan C. Gordon <icculus@icculus.org>",
658
1981818c6170 Removed all the forward declaration cruft from the archivers.
Ryan C. Gordon <icculus@icculus.org>
parents: 657
diff changeset
   103
    "http://icculus.org/physfs/",
1981818c6170 Removed all the forward declaration cruft from the archivers.
Ryan C. Gordon <icculus@icculus.org>
parents: 657
diff changeset
   104
};
1981818c6170 Removed all the forward declaration cruft from the archivers.
Ryan C. Gordon <icculus@icculus.org>
parents: 657
diff changeset
   105
1981818c6170 Removed all the forward declaration cruft from the archivers.
Ryan C. Gordon <icculus@icculus.org>
parents: 657
diff changeset
   106
1981818c6170 Removed all the forward declaration cruft from the archivers.
Ryan C. Gordon <icculus@icculus.org>
parents: 657
diff changeset
   107
const PHYSFS_Archiver __PHYSFS_Archiver_GRP =
1981818c6170 Removed all the forward declaration cruft from the archivers.
Ryan C. Gordon <icculus@icculus.org>
parents: 657
diff changeset
   108
{
1981818c6170 Removed all the forward declaration cruft from the archivers.
Ryan C. Gordon <icculus@icculus.org>
parents: 657
diff changeset
   109
    &__PHYSFS_ArchiveInfo_GRP,
1981818c6170 Removed all the forward declaration cruft from the archivers.
Ryan C. Gordon <icculus@icculus.org>
parents: 657
diff changeset
   110
    GRP_openArchive,        /* openArchive() method    */
1128
067d8e76261e Moved most the cut-and-paste between simple archivers to one file.
Ryan C. Gordon <icculus@icculus.org>
parents: 1125
diff changeset
   111
    UNPK_enumerateFiles,    /* enumerateFiles() method */
067d8e76261e Moved most the cut-and-paste between simple archivers to one file.
Ryan C. Gordon <icculus@icculus.org>
parents: 1125
diff changeset
   112
    UNPK_openRead,          /* openRead() method       */
067d8e76261e Moved most the cut-and-paste between simple archivers to one file.
Ryan C. Gordon <icculus@icculus.org>
parents: 1125
diff changeset
   113
    UNPK_openWrite,         /* openWrite() method      */
067d8e76261e Moved most the cut-and-paste between simple archivers to one file.
Ryan C. Gordon <icculus@icculus.org>
parents: 1125
diff changeset
   114
    UNPK_openAppend,        /* openAppend() method     */
067d8e76261e Moved most the cut-and-paste between simple archivers to one file.
Ryan C. Gordon <icculus@icculus.org>
parents: 1125
diff changeset
   115
    UNPK_remove,            /* remove() method         */
067d8e76261e Moved most the cut-and-paste between simple archivers to one file.
Ryan C. Gordon <icculus@icculus.org>
parents: 1125
diff changeset
   116
    UNPK_mkdir,             /* mkdir() method          */
067d8e76261e Moved most the cut-and-paste between simple archivers to one file.
Ryan C. Gordon <icculus@icculus.org>
parents: 1125
diff changeset
   117
    UNPK_dirClose,          /* dirClose() method       */
067d8e76261e Moved most the cut-and-paste between simple archivers to one file.
Ryan C. Gordon <icculus@icculus.org>
parents: 1125
diff changeset
   118
    UNPK_stat               /* stat() method           */
658
1981818c6170 Removed all the forward declaration cruft from the archivers.
Ryan C. Gordon <icculus@icculus.org>
parents: 657
diff changeset
   119
};
1981818c6170 Removed all the forward declaration cruft from the archivers.
Ryan C. Gordon <icculus@icculus.org>
parents: 657
diff changeset
   120
214
19846c18071b Initial autoconf support.
Ryan C. Gordon <icculus@icculus.org>
parents: 194
diff changeset
   121
#endif  /* defined PHYSFS_SUPPORTS_GRP */
19846c18071b Initial autoconf support.
Ryan C. Gordon <icculus@icculus.org>
parents: 194
diff changeset
   122
24
b050804123a3 Initial add. Implemented, buggy, but not crashing.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   123
/* end of grp.c ... */
b050804123a3 Initial add. Implemented, buggy, but not crashing.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   124