src/video/SDL_blit_0.c
author Sam Lantinga <slouken@libsdl.org>
Wed, 27 Aug 2008 15:10:03 +0000
changeset 2735 204be4fc2726
parent 2267 c785543d1843
child 2853 6258fa7cd300
permissions -rw-r--r--
Final merge of Google Summer of Code 2008 work...

Port SDL 1.3 to the Nintendo DS
by Darren Alton, mentored by Sam Lantinga
slouken@0
     1
/*
slouken@0
     2
    SDL - Simple DirectMedia Layer
slouken@1312
     3
    Copyright (C) 1997-2006 Sam Lantinga
slouken@0
     4
slouken@0
     5
    This library is free software; you can redistribute it and/or
slouken@1312
     6
    modify it under the terms of the GNU Lesser General Public
slouken@0
     7
    License as published by the Free Software Foundation; either
slouken@1312
     8
    version 2.1 of the License, or (at your option) any later version.
slouken@0
     9
slouken@0
    10
    This library is distributed in the hope that it will be useful,
slouken@0
    11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
slouken@0
    12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
slouken@1312
    13
    Lesser General Public License for more details.
slouken@0
    14
slouken@1312
    15
    You should have received a copy of the GNU Lesser General Public
slouken@1312
    16
    License along with this library; if not, write to the Free Software
slouken@1312
    17
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
slouken@0
    18
slouken@0
    19
    Sam Lantinga
slouken@252
    20
    slouken@libsdl.org
slouken@0
    21
*/
slouken@1402
    22
#include "SDL_config.h"
slouken@0
    23
slouken@0
    24
#include "SDL_video.h"
slouken@0
    25
#include "SDL_blit.h"
slouken@0
    26
slouken@0
    27
/* Functions to blit from bitmaps to other surfaces */
slouken@0
    28
slouken@1895
    29
static void
slouken@1895
    30
BlitBto1(SDL_BlitInfo * info)
slouken@0
    31
{
slouken@1895
    32
    int c;
slouken@1895
    33
    int width, height;
slouken@1895
    34
    Uint8 *src, *map, *dst;
slouken@1895
    35
    int srcskip, dstskip;
slouken@0
    36
slouken@1895
    37
    /* Set up some basic variables */
slouken@2262
    38
    width = info->dst_w;
slouken@2262
    39
    height = info->dst_h;
slouken@2262
    40
    src = info->src;
slouken@2267
    41
    srcskip = info->src_skip;
slouken@2262
    42
    dst = info->dst;
slouken@2267
    43
    dstskip = info->dst_skip;
slouken@1895
    44
    map = info->table;
slouken@1895
    45
    srcskip += width - (width + 7) / 8;
slouken@0
    46
slouken@1895
    47
    if (map) {
slouken@1895
    48
        while (height--) {
slouken@1895
    49
            Uint8 byte = 0, bit;
slouken@1895
    50
            for (c = 0; c < width; ++c) {
slouken@1895
    51
                if ((c & 7) == 0) {
slouken@1895
    52
                    byte = *src++;
slouken@1895
    53
                }
slouken@1895
    54
                bit = (byte & 0x80) >> 7;
slouken@1895
    55
                if (1) {
slouken@1895
    56
                    *dst = map[bit];
slouken@1895
    57
                }
slouken@1895
    58
                dst++;
slouken@1895
    59
                byte <<= 1;
slouken@1895
    60
            }
slouken@1895
    61
            src += srcskip;
slouken@1895
    62
            dst += dstskip;
slouken@1895
    63
        }
slouken@1895
    64
    } else {
slouken@1895
    65
        while (height--) {
slouken@1895
    66
            Uint8 byte = 0, bit;
slouken@1895
    67
            for (c = 0; c < width; ++c) {
slouken@1895
    68
                if ((c & 7) == 0) {
slouken@1895
    69
                    byte = *src++;
slouken@1895
    70
                }
slouken@1895
    71
                bit = (byte & 0x80) >> 7;
slouken@1895
    72
                if (1) {
slouken@1895
    73
                    *dst = bit;
slouken@1895
    74
                }
slouken@1895
    75
                dst++;
slouken@1895
    76
                byte <<= 1;
slouken@1895
    77
            }
slouken@1895
    78
            src += srcskip;
slouken@1895
    79
            dst += dstskip;
slouken@1895
    80
        }
slouken@1895
    81
    }
slouken@0
    82
}
slouken@2735
    83
slouken@1895
    84
static void
slouken@1895
    85
BlitBto2(SDL_BlitInfo * info)
slouken@0
    86
{
slouken@1895
    87
    int c;
slouken@1895
    88
    int width, height;
slouken@1895
    89
    Uint8 *src;
slouken@1895
    90
    Uint16 *map, *dst;
slouken@1895
    91
    int srcskip, dstskip;
slouken@0
    92
slouken@1895
    93
    /* Set up some basic variables */
slouken@2262
    94
    width = info->dst_w;
slouken@2262
    95
    height = info->dst_h;
slouken@2262
    96
    src = info->src;
slouken@2267
    97
    srcskip = info->src_skip;
slouken@2262
    98
    dst = (Uint16 *) info->dst;
slouken@2267
    99
    dstskip = info->dst_skip / 2;
slouken@1895
   100
    map = (Uint16 *) info->table;
slouken@1895
   101
    srcskip += width - (width + 7) / 8;
slouken@0
   102
slouken@1895
   103
    while (height--) {
slouken@1895
   104
        Uint8 byte = 0, bit;
slouken@1895
   105
        for (c = 0; c < width; ++c) {
slouken@1895
   106
            if ((c & 7) == 0) {
slouken@1895
   107
                byte = *src++;
slouken@1895
   108
            }
slouken@1895
   109
            bit = (byte & 0x80) >> 7;
slouken@1895
   110
            if (1) {
slouken@1895
   111
                *dst = map[bit];
slouken@1895
   112
            }
slouken@1895
   113
            byte <<= 1;
slouken@1895
   114
            dst++;
slouken@1895
   115
        }
slouken@1895
   116
        src += srcskip;
slouken@1895
   117
        dst += dstskip;
slouken@1895
   118
    }
slouken@0
   119
}
slouken@2735
   120
slouken@1895
   121
static void
slouken@1895
   122
BlitBto3(SDL_BlitInfo * info)
slouken@0
   123
{
slouken@1895
   124
    int c, o;
slouken@1895
   125
    int width, height;
slouken@1895
   126
    Uint8 *src, *map, *dst;
slouken@1895
   127
    int srcskip, dstskip;
slouken@0
   128
slouken@1895
   129
    /* Set up some basic variables */
slouken@2262
   130
    width = info->dst_w;
slouken@2262
   131
    height = info->dst_h;
slouken@2262
   132
    src = info->src;
slouken@2267
   133
    srcskip = info->src_skip;
slouken@2262
   134
    dst = info->dst;
slouken@2267
   135
    dstskip = info->dst_skip;
slouken@1895
   136
    map = info->table;
slouken@1895
   137
    srcskip += width - (width + 7) / 8;
slouken@0
   138
slouken@1895
   139
    while (height--) {
slouken@1895
   140
        Uint8 byte = 0, bit;
slouken@1895
   141
        for (c = 0; c < width; ++c) {
slouken@1895
   142
            if ((c & 7) == 0) {
slouken@1895
   143
                byte = *src++;
slouken@1895
   144
            }
slouken@1895
   145
            bit = (byte & 0x80) >> 7;
slouken@1895
   146
            if (1) {
slouken@1895
   147
                o = bit * 4;
slouken@1895
   148
                dst[0] = map[o++];
slouken@1895
   149
                dst[1] = map[o++];
slouken@1895
   150
                dst[2] = map[o++];
slouken@1895
   151
            }
slouken@1895
   152
            byte <<= 1;
slouken@1895
   153
            dst += 3;
slouken@1895
   154
        }
slouken@1895
   155
        src += srcskip;
slouken@1895
   156
        dst += dstskip;
slouken@1895
   157
    }
slouken@0
   158
}
slouken@2735
   159
slouken@1895
   160
static void
slouken@1895
   161
BlitBto4(SDL_BlitInfo * info)
slouken@0
   162
{
slouken@1895
   163
    int width, height;
slouken@1895
   164
    Uint8 *src;
slouken@1895
   165
    Uint32 *map, *dst;
slouken@1895
   166
    int srcskip, dstskip;
slouken@1895
   167
    int c;
slouken@0
   168
slouken@1895
   169
    /* Set up some basic variables */
slouken@2262
   170
    width = info->dst_w;
slouken@2262
   171
    height = info->dst_h;
slouken@2262
   172
    src = info->src;
slouken@2267
   173
    srcskip = info->src_skip;
slouken@2262
   174
    dst = (Uint32 *) info->dst;
slouken@2267
   175
    dstskip = info->dst_skip / 4;
slouken@1895
   176
    map = (Uint32 *) info->table;
slouken@1895
   177
    srcskip += width - (width + 7) / 8;
slouken@0
   178
slouken@1895
   179
    while (height--) {
slouken@1895
   180
        Uint8 byte = 0, bit;
slouken@1895
   181
        for (c = 0; c < width; ++c) {
slouken@1895
   182
            if ((c & 7) == 0) {
slouken@1895
   183
                byte = *src++;
slouken@1895
   184
            }
slouken@1895
   185
            bit = (byte & 0x80) >> 7;
slouken@1895
   186
            if (1) {
slouken@1895
   187
                *dst = map[bit];
slouken@1895
   188
            }
slouken@1895
   189
            byte <<= 1;
slouken@1895
   190
            dst++;
slouken@1895
   191
        }
slouken@1895
   192
        src += srcskip;
slouken@1895
   193
        dst += dstskip;
slouken@1895
   194
    }
slouken@0
   195
}
slouken@0
   196
slouken@1895
   197
static void
slouken@1895
   198
BlitBto1Key(SDL_BlitInfo * info)
slouken@0
   199
{
slouken@2262
   200
    int width = info->dst_w;
slouken@2262
   201
    int height = info->dst_h;
slouken@2262
   202
    Uint8 *src = info->src;
slouken@2262
   203
    Uint8 *dst = info->dst;
slouken@2267
   204
    int srcskip = info->src_skip;
slouken@2267
   205
    int dstskip = info->dst_skip;
slouken@2267
   206
    Uint32 ckey = info->colorkey;
slouken@1895
   207
    Uint8 *palmap = info->table;
slouken@1895
   208
    int c;
slouken@0
   209
slouken@1895
   210
    /* Set up some basic variables */
slouken@1895
   211
    srcskip += width - (width + 7) / 8;
slouken@0
   212
slouken@1895
   213
    if (palmap) {
slouken@1895
   214
        while (height--) {
slouken@1895
   215
            Uint8 byte = 0, bit;
slouken@1895
   216
            for (c = 0; c < width; ++c) {
slouken@1895
   217
                if ((c & 7) == 0) {
slouken@1895
   218
                    byte = *src++;
slouken@1895
   219
                }
slouken@1895
   220
                bit = (byte & 0x80) >> 7;
slouken@1895
   221
                if (bit != ckey) {
slouken@1895
   222
                    *dst = palmap[bit];
slouken@1895
   223
                }
slouken@1895
   224
                dst++;
slouken@1895
   225
                byte <<= 1;
slouken@1895
   226
            }
slouken@1895
   227
            src += srcskip;
slouken@1895
   228
            dst += dstskip;
slouken@1895
   229
        }
slouken@1895
   230
    } else {
slouken@1895
   231
        while (height--) {
slouken@1895
   232
            Uint8 byte = 0, bit;
slouken@1895
   233
            for (c = 0; c < width; ++c) {
slouken@1895
   234
                if ((c & 7) == 0) {
slouken@1895
   235
                    byte = *src++;
slouken@1895
   236
                }
slouken@1895
   237
                bit = (byte & 0x80) >> 7;
slouken@1895
   238
                if (bit != ckey) {
slouken@1895
   239
                    *dst = bit;
slouken@1895
   240
                }
slouken@1895
   241
                dst++;
slouken@1895
   242
                byte <<= 1;
slouken@1895
   243
            }
slouken@1895
   244
            src += srcskip;
slouken@1895
   245
            dst += dstskip;
slouken@1895
   246
        }
slouken@1895
   247
    }
slouken@0
   248
}
slouken@0
   249
slouken@1895
   250
static void
slouken@1895
   251
BlitBto2Key(SDL_BlitInfo * info)
slouken@0
   252
{
slouken@2262
   253
    int width = info->dst_w;
slouken@2262
   254
    int height = info->dst_h;
slouken@2262
   255
    Uint8 *src = info->src;
slouken@2262
   256
    Uint16 *dstp = (Uint16 *) info->dst;
slouken@2267
   257
    int srcskip = info->src_skip;
slouken@2267
   258
    int dstskip = info->dst_skip;
slouken@2267
   259
    Uint32 ckey = info->colorkey;
slouken@1895
   260
    Uint8 *palmap = info->table;
slouken@1895
   261
    int c;
slouken@0
   262
slouken@1895
   263
    /* Set up some basic variables */
slouken@1895
   264
    srcskip += width - (width + 7) / 8;
slouken@1895
   265
    dstskip /= 2;
slouken@0
   266
slouken@1895
   267
    while (height--) {
slouken@1895
   268
        Uint8 byte = 0, bit;
slouken@1895
   269
        for (c = 0; c < width; ++c) {
slouken@1895
   270
            if ((c & 7) == 0) {
slouken@1895
   271
                byte = *src++;
slouken@1895
   272
            }
slouken@1895
   273
            bit = (byte & 0x80) >> 7;
slouken@1895
   274
            if (bit != ckey) {
slouken@1895
   275
                *dstp = ((Uint16 *) palmap)[bit];
slouken@1895
   276
            }
slouken@1895
   277
            byte <<= 1;
slouken@1895
   278
            dstp++;
slouken@1895
   279
        }
slouken@1895
   280
        src += srcskip;
slouken@1895
   281
        dstp += dstskip;
slouken@1895
   282
    }
slouken@0
   283
}
slouken@0
   284
slouken@1895
   285
static void
slouken@1895
   286
BlitBto3Key(SDL_BlitInfo * info)
slouken@0
   287
{
slouken@2262
   288
    int width = info->dst_w;
slouken@2262
   289
    int height = info->dst_h;
slouken@2262
   290
    Uint8 *src = info->src;
slouken@2262
   291
    Uint8 *dst = info->dst;
slouken@2267
   292
    int srcskip = info->src_skip;
slouken@2267
   293
    int dstskip = info->dst_skip;
slouken@2267
   294
    Uint32 ckey = info->colorkey;
slouken@1895
   295
    Uint8 *palmap = info->table;
slouken@1895
   296
    int c;
slouken@0
   297
slouken@1895
   298
    /* Set up some basic variables */
slouken@1895
   299
    srcskip += width - (width + 7) / 8;
slouken@0
   300
slouken@1895
   301
    while (height--) {
slouken@1895
   302
        Uint8 byte = 0, bit;
slouken@1895
   303
        for (c = 0; c < width; ++c) {
slouken@1895
   304
            if ((c & 7) == 0) {
slouken@1895
   305
                byte = *src++;
slouken@1895
   306
            }
slouken@1895
   307
            bit = (byte & 0x80) >> 7;
slouken@1895
   308
            if (bit != ckey) {
slouken@1895
   309
                SDL_memcpy(dst, &palmap[bit * 4], 3);
slouken@1895
   310
            }
slouken@1895
   311
            byte <<= 1;
slouken@1895
   312
            dst += 3;
slouken@1895
   313
        }
slouken@1895
   314
        src += srcskip;
slouken@1895
   315
        dst += dstskip;
slouken@1895
   316
    }
slouken@0
   317
}
slouken@0
   318
slouken@1895
   319
static void
slouken@1895
   320
BlitBto4Key(SDL_BlitInfo * info)
slouken@0
   321
{
slouken@2262
   322
    int width = info->dst_w;
slouken@2262
   323
    int height = info->dst_h;
slouken@2262
   324
    Uint8 *src = info->src;
slouken@2262
   325
    Uint32 *dstp = (Uint32 *) info->dst;
slouken@2267
   326
    int srcskip = info->src_skip;
slouken@2267
   327
    int dstskip = info->dst_skip;
slouken@2267
   328
    Uint32 ckey = info->colorkey;
slouken@1895
   329
    Uint8 *palmap = info->table;
slouken@1895
   330
    int c;
slouken@0
   331
slouken@1895
   332
    /* Set up some basic variables */
slouken@1895
   333
    srcskip += width - (width + 7) / 8;
slouken@1895
   334
    dstskip /= 4;
slouken@0
   335
slouken@1895
   336
    while (height--) {
slouken@1895
   337
        Uint8 byte = 0, bit;
slouken@1895
   338
        for (c = 0; c < width; ++c) {
slouken@1895
   339
            if ((c & 7) == 0) {
slouken@1895
   340
                byte = *src++;
slouken@1895
   341
            }
slouken@1895
   342
            bit = (byte & 0x80) >> 7;
slouken@1895
   343
            if (bit != ckey) {
slouken@1895
   344
                *dstp = ((Uint32 *) palmap)[bit];
slouken@1895
   345
            }
slouken@1895
   346
            byte <<= 1;
slouken@1895
   347
            dstp++;
slouken@1895
   348
        }
slouken@1895
   349
        src += srcskip;
slouken@1895
   350
        dstp += dstskip;
slouken@1895
   351
    }
slouken@0
   352
}
slouken@0
   353
slouken@1895
   354
static void
slouken@1895
   355
BlitBtoNAlpha(SDL_BlitInfo * info)
slouken@0
   356
{
slouken@2262
   357
    int width = info->dst_w;
slouken@2262
   358
    int height = info->dst_h;
slouken@2262
   359
    Uint8 *src = info->src;
slouken@2262
   360
    Uint8 *dst = info->dst;
slouken@2267
   361
    int srcskip = info->src_skip;
slouken@2267
   362
    int dstskip = info->dst_skip;
slouken@2267
   363
    const SDL_Color *srcpal = info->src_fmt->palette->colors;
slouken@2267
   364
    SDL_PixelFormat *dstfmt = info->dst_fmt;
slouken@1895
   365
    int dstbpp;
slouken@1895
   366
    int c;
slouken@2267
   367
    const int A = info->a;
slouken@0
   368
slouken@1895
   369
    /* Set up some basic variables */
slouken@1895
   370
    dstbpp = dstfmt->BytesPerPixel;
slouken@1895
   371
    srcskip += width - (width + 7) / 8;
slouken@0
   372
slouken@1895
   373
    while (height--) {
slouken@1895
   374
        Uint8 byte = 0, bit;
slouken@1895
   375
        for (c = 0; c < width; ++c) {
slouken@1895
   376
            if ((c & 7) == 0) {
slouken@1895
   377
                byte = *src++;
slouken@1895
   378
            }
slouken@1895
   379
            bit = (byte & 0x80) >> 7;
slouken@1895
   380
            if (1) {
slouken@1895
   381
                Uint32 pixel;
slouken@1895
   382
                unsigned sR, sG, sB;
slouken@1895
   383
                unsigned dR, dG, dB;
slouken@1895
   384
                sR = srcpal[bit].r;
slouken@1895
   385
                sG = srcpal[bit].g;
slouken@1895
   386
                sB = srcpal[bit].b;
slouken@1895
   387
                DISEMBLE_RGB(dst, dstbpp, dstfmt, pixel, dR, dG, dB);
slouken@1895
   388
                ALPHA_BLEND(sR, sG, sB, A, dR, dG, dB);
slouken@1895
   389
                ASSEMBLE_RGB(dst, dstbpp, dstfmt, dR, dG, dB);
slouken@1895
   390
            }
slouken@1895
   391
            byte <<= 1;
slouken@1895
   392
            dst += dstbpp;
slouken@1895
   393
        }
slouken@1895
   394
        src += srcskip;
slouken@1895
   395
        dst += dstskip;
slouken@1895
   396
    }
slouken@0
   397
}
slouken@0
   398
slouken@1895
   399
static void
slouken@1895
   400
BlitBtoNAlphaKey(SDL_BlitInfo * info)
slouken@0
   401
{
slouken@2262
   402
    int width = info->dst_w;
slouken@2262
   403
    int height = info->dst_h;
slouken@2262
   404
    Uint8 *src = info->src;
slouken@2262
   405
    Uint8 *dst = info->dst;
slouken@2267
   406
    int srcskip = info->src_skip;
slouken@2267
   407
    int dstskip = info->dst_skip;
slouken@2267
   408
    SDL_PixelFormat *srcfmt = info->src_fmt;
slouken@2267
   409
    SDL_PixelFormat *dstfmt = info->dst_fmt;
slouken@1895
   410
    const SDL_Color *srcpal = srcfmt->palette->colors;
slouken@1895
   411
    int dstbpp;
slouken@1895
   412
    int c;
slouken@2267
   413
    const int A = info->a;
slouken@2267
   414
    Uint32 ckey = info->colorkey;
slouken@0
   415
slouken@1895
   416
    /* Set up some basic variables */
slouken@1895
   417
    dstbpp = dstfmt->BytesPerPixel;
slouken@1895
   418
    srcskip += width - (width + 7) / 8;
slouken@0
   419
slouken@1895
   420
    while (height--) {
slouken@1895
   421
        Uint8 byte = 0, bit;
slouken@1895
   422
        for (c = 0; c < width; ++c) {
slouken@1895
   423
            if ((c & 7) == 0) {
slouken@1895
   424
                byte = *src++;
slouken@1895
   425
            }
slouken@1895
   426
            bit = (byte & 0x80) >> 7;
slouken@1895
   427
            if (bit != ckey) {
slouken@1895
   428
                int sR, sG, sB;
slouken@1895
   429
                int dR, dG, dB;
slouken@1895
   430
                Uint32 pixel;
slouken@1895
   431
                sR = srcpal[bit].r;
slouken@1895
   432
                sG = srcpal[bit].g;
slouken@1895
   433
                sB = srcpal[bit].b;
slouken@1895
   434
                DISEMBLE_RGB(dst, dstbpp, dstfmt, pixel, dR, dG, dB);
slouken@1895
   435
                ALPHA_BLEND(sR, sG, sB, A, dR, dG, dB);
slouken@1895
   436
                ASSEMBLE_RGB(dst, dstbpp, dstfmt, dR, dG, dB);
slouken@1895
   437
            }
slouken@1895
   438
            byte <<= 1;
slouken@1895
   439
            dst += dstbpp;
slouken@1895
   440
        }
slouken@1895
   441
        src += srcskip;
slouken@1895
   442
        dst += dstskip;
slouken@1895
   443
    }
slouken@0
   444
}
slouken@0
   445
slouken@2267
   446
static SDL_BlitFunc bitmap_blit[] = {
slouken@1895
   447
    NULL, BlitBto1, BlitBto2, BlitBto3, BlitBto4
slouken@0
   448
};
slouken@0
   449
slouken@2267
   450
static SDL_BlitFunc colorkey_blit[] = {
slouken@0
   451
    NULL, BlitBto1Key, BlitBto2Key, BlitBto3Key, BlitBto4Key
slouken@0
   452
};
slouken@0
   453
slouken@2267
   454
SDL_BlitFunc
slouken@2267
   455
SDL_CalculateBlit0(SDL_Surface * surface)
slouken@0
   456
{
slouken@1895
   457
    int which;
slouken@0
   458
slouken@1895
   459
    if (surface->format->BitsPerPixel != 1) {
slouken@1895
   460
        /* We don't support sub 8-bit packed pixel modes */
slouken@1895
   461
        return NULL;
slouken@1895
   462
    }
slouken@1895
   463
    if (surface->map->dst->format->BitsPerPixel < 8) {
slouken@1895
   464
        which = 0;
slouken@1895
   465
    } else {
slouken@1895
   466
        which = surface->map->dst->format->BytesPerPixel;
slouken@1895
   467
    }
slouken@2267
   468
    switch (surface->map->info.flags) {
slouken@2267
   469
    case 0:
slouken@1895
   470
        return bitmap_blit[which];
slouken@0
   471
slouken@2267
   472
    case SDL_COPY_COLORKEY:
slouken@1895
   473
        return colorkey_blit[which];
slouken@0
   474
slouken@2267
   475
    case SDL_COPY_MODULATE_ALPHA | SDL_COPY_BLEND:
slouken@1895
   476
        return which >= 2 ? BlitBtoNAlpha : NULL;
slouken@0
   477
slouken@2267
   478
    case SDL_COPY_COLORKEY | SDL_COPY_MODULATE_ALPHA | SDL_COPY_BLEND:
slouken@1895
   479
        return which >= 2 ? BlitBtoNAlphaKey : NULL;
slouken@1895
   480
    }
slouken@1895
   481
    return NULL;
slouken@0
   482
}
slouken@0
   483
slouken@1895
   484
/* vi: set ts=4 sw=4 expandtab: */