Ignore:
Timestamp:
Sep 27, 2008, 3:12:46 PM (11 years ago)
Author:
Sam Hocevar
Message:

Starting refactoring to get rid of libcucul. The initial reason for the
split is rendered moot by the plugin system: when enabled, binaries do
not link directly with libX11 or libGL. I hope this is a step towards
more consisteny and clarity.

File:
1 copied

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/caca/file.c

    r2819 r2821  
    11/*
    2  *  libcucul      Canvas for ultrafast compositing of Unicode letters
     2 *  libcaca       Colour ASCII-Art library
    33 *  Copyright (c) 2006-2007 Sam Hocevar <sam@zoy.org>
    44 *                All Rights Reserved
     
    3030#endif
    3131
    32 #include "cucul.h"
    33 #include "cucul_internals.h"
     32#include "caca.h"
     33#include "caca_internals.h"
    3434
    3535#if !defined __KERNEL__ && defined HAVE_ZLIB_H
    36 static int zipread(cucul_file_t *, void *, unsigned int);
     36static int zipread(caca_file_t *, void *, unsigned int);
    3737#endif
    3838
    3939#if !defined __KERNEL__
    40 struct cucul_file
     40struct caca_file
    4141{
    4242#   if defined HAVE_ZLIB_H
     
    5151#endif
    5252
    53 cucul_file_t *cucul_file_open(char const *path, const char *mode)
     53caca_file_t *caca_file_open(char const *path, const char *mode)
    5454{
    5555#if defined __KERNEL__
     
    5757    return NULL;
    5858#else
    59     cucul_file_t *fp = malloc(sizeof(*fp));
     59    caca_file_t *fp = malloc(sizeof(*fp));
    6060
    6161    fp->readonly = !!strchr(mode, 'r');
     
    126126}
    127127
    128 int cucul_file_close(cucul_file_t *fp)
     128int caca_file_close(caca_file_t *fp)
    129129{
    130130#if defined __KERNEL__
     
    144144}
    145145
    146 uint64_t cucul_file_tell(cucul_file_t *fp)
     146uint64_t caca_file_tell(caca_file_t *fp)
    147147{
    148148#if defined __KERNEL__
     
    158158}
    159159
    160 size_t cucul_file_read(cucul_file_t *fp, void *ptr, size_t size)
     160size_t caca_file_read(caca_file_t *fp, void *ptr, size_t size)
    161161{
    162162#if defined __KERNEL__
     
    172172}
    173173
    174 size_t cucul_file_write(cucul_file_t *fp, const void *ptr, size_t size)
     174size_t caca_file_write(caca_file_t *fp, const void *ptr, size_t size)
    175175{
    176176#if defined __KERNEL__
     
    195195}
    196196
    197 char *cucul_file_gets(cucul_file_t *fp, char *s, int size)
     197char *caca_file_gets(caca_file_t *fp, char *s, int size)
    198198{
    199199#if defined __KERNEL__
     
    229229}
    230230
    231 int cucul_file_eof(cucul_file_t *fp)
     231int caca_file_eof(caca_file_t *fp)
    232232{
    233233#if defined __KERNEL__
     
    241241
    242242#if !defined __KERNEL__ && defined HAVE_ZLIB_H
    243 static int zipread(cucul_file_t *fp, void *buf, unsigned int len)
     243static int zipread(caca_file_t *fp, void *buf, unsigned int len)
    244244{
    245245    unsigned int total_read = 0;
Note: See TracChangeset for help on using the changeset viewer.