Changeset 1313 for libcaca/trunk


Ignore:
Timestamp:
Nov 9, 2006, 12:14:57 PM (16 years ago)
Author:
Sam Hocevar
Message:
  • Minor documentation fixes.
Location:
libcaca/trunk/cucul
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/cucul/canvas.c

    r1254 r1313  
    144144 *  \param x X coordinate.
    145145 *  \param y Y coordinate.
    146  *  \param ch The requested character value.
    147146 *  \return This function always returns 0.
    148147 */
  • libcaca/trunk/cucul/import.c

    r1307 r1313  
    7777 *  - \c EINVAL Invalid format requested.
    7878 *
    79  *  \param A libcucul canvas in which to import the file.
    80  *  \param buffer A \e libcucul buffer containing the data to be loaded
    81  *         into a canvas.
     79 *  \param cv A libcucul canvas in which to import the file.
     80 *  \param data A memory area containing the data to be loaded into the canvas.
     81 *  \param len The size in bytes of the memory area.
    8282 *  \param format A string describing the input format.
    8383 *  \return The number of bytes read, or -1 if an error occurred.
    8484 */
    85 long int cucul_import_memory(cucul_canvas_t *cv, void const *buf,
     85long int cucul_import_memory(cucul_canvas_t *cv, void const *data,
    8686                             unsigned long int len, char const *format)
    8787{
    8888    if(!strcasecmp("caca", format))
    89         return import_caca(cv, buf, len);
     89        return import_caca(cv, data, len);
    9090    if(!strcasecmp("utf8", format))
    91         return import_ansi(cv, buf, len, 1);
     91        return import_ansi(cv, data, len, 1);
    9292    if(!strcasecmp("text", format))
    93         return import_text(cv, buf, len);
     93        return import_text(cv, data, len);
    9494    if(!strcasecmp("ansi", format))
    95         return import_ansi(cv, buf, len, 0);
     95        return import_ansi(cv, data, len, 0);
    9696
    9797    /* Autodetection */
    9898    if(!strcasecmp("", format))
    9999    {
    100         unsigned char const *str = buf;
     100        unsigned char const *str = data;
    101101        unsigned int i;
    102102
     
    104104        if(len >= 4 && str[0] == 0xca &&
    105105           str[1] == 0xca && str[2] == 'C' && str[3] == 'V')
    106             return import_caca(cv, buf, len);
     106            return import_caca(cv, data, len);
    107107
    108108        /* If we find ESC[ argv, we guess it's an ANSI file */
    109109        for(i = 0; i + 1 < len; i++)
    110110            if((str[i] == 0x1b) && (str[i + 1] == '['))
    111                 return import_ansi(cv, buf, len, 0);
     111                return import_ansi(cv, data, len, 0);
    112112
    113113        /* Otherwise, import it as text */
    114         return import_text(cv, buf, len);
     114        return import_text(cv, data, len);
    115115    }
    116116
     
    141141 *  errors specified for the routine fopen().
    142142 *
    143  *  \param A libcucul canvas in which to import the file.
     143 *  \param cv A libcucul canvas in which to import the file.
    144144 *  \param filename The name of the file to load.
    145145 *  \param format A string describing the input format.
Note: See TracChangeset for help on using the changeset viewer.