Ignore:
Timestamp:
04/19/08 21:25:41 (5 years ago)
Author:
sam
Message:
  • Changed most of the long ints in the API into C99 types. WARNING: this completely breaks compatibility with previous versions of libcaca on 64-bit systems.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/cxx/cucul++.cpp

    r2074 r2303  
    2626 
    2727 
    28 unsigned long int Charset::utf8ToUtf32(char const *s, unsigned int *read) 
     28uint32_t Charset::utf8ToUtf32(char const *s, unsigned int *read) 
    2929{ 
    3030    return cucul_utf8_to_utf32(s, read); 
    3131} 
    32 unsigned int Charset::utf32ToUtf8(char *buf, unsigned long int ch) 
     32unsigned int Charset::utf32ToUtf8(char *buf, uint32_t ch) 
    3333{ 
    3434    return cucul_utf32_to_utf8(buf, ch); 
    3535} 
    36 unsigned char Charset::utf32ToCp437(unsigned long int ch) 
     36uint8_t Charset::utf32ToCp437(uint32_t ch) 
    3737{ 
    3838    return cucul_utf32_to_cp437(ch); 
    3939} 
    40 unsigned long int Charset::cp437ToUtf32(unsigned char ch) 
     40uint32_t Charset::cp437ToUtf32(uint8_t ch) 
    4141{ 
    4242    return cucul_cp437_to_utf32(ch); 
     
    8383} 
    8484 
    85 int Cucul::setColorANSI(unsigned char f, unsigned char b) 
     85int Cucul::setColorANSI(uint8_t f, uint8_t b) 
    8686{ 
    8787    return cucul_set_color_ansi(cv, f, b); 
     
    9393} 
    9494 
    95 void Cucul::putChar(int x, int y, unsigned long int ch) 
     95void Cucul::putChar(int x, int y, uint32_t ch) 
    9696{ 
    9797    cucul_put_char(cv, x, y, ch); 
    9898} 
    9999 
    100 unsigned long int Cucul::getChar(int x, int y) 
     100uint32_t Cucul::getChar(int x, int y) 
    101101{ 
    102102    return cucul_get_char(cv, x, y); 
     
    157157} 
    158158 
    159 void Cucul::drawLine(int x1, int y1, int x2, int y2, unsigned long int ch) 
     159void Cucul::drawLine(int x1, int y1, int x2, int y2, uint32_t ch) 
    160160{ 
    161161    cucul_draw_line(cv, x1, y1, x2, y2, ch); 
    162162} 
    163163 
    164 void Cucul::drawPolyline(int const x[], int const y[], int f, unsigned long int ch) 
     164void Cucul::drawPolyline(int const x[], int const y[], int f, uint32_t ch) 
    165165{ 
    166166    cucul_draw_polyline(cv, x, y, f, ch); 
     
    177177} 
    178178 
    179 void Cucul::drawCircle(int x, int y, int d, unsigned long int ch) 
     179void Cucul::drawCircle(int x, int y, int d, uint32_t ch) 
    180180{ 
    181181    cucul_draw_circle(cv, x, y, d, ch); 
    182182} 
    183183 
    184 void Cucul::drawEllipse(int x, int y, int d1, int d2, unsigned long int ch) 
     184void Cucul::drawEllipse(int x, int y, int d1, int d2, uint32_t ch) 
    185185{ 
    186186    cucul_draw_ellipse(cv, x, y, d1, d2, ch); 
     
    192192} 
    193193 
    194 void Cucul::fillEllipse(int x, int y, int d1, int d2, unsigned long int ch) 
     194void Cucul::fillEllipse(int x, int y, int d1, int d2, uint32_t ch) 
    195195{ 
    196196    cucul_fill_ellipse(cv, x, y, d1, d2, ch); 
    197197} 
    198198 
    199 void Cucul::drawBox(int x, int y, int w, int h, unsigned long int ch) 
     199void Cucul::drawBox(int x, int y, int w, int h, uint32_t ch) 
    200200{ 
    201201    cucul_draw_box(cv, x, y, w, h, ch); 
     
    212212} 
    213213 
    214 void Cucul::fillBox(int x, int y, int w, int h, unsigned long int ch) 
     214void Cucul::fillBox(int x, int y, int w, int h, uint32_t ch) 
    215215{ 
    216216    cucul_fill_box(cv, x, y, w, h, ch); 
    217217} 
    218218 
    219 void Cucul::drawTriangle(int x1, int y1, int x2, int y2, int x3, int y3, unsigned long int ch) 
     219void Cucul::drawTriangle(int x1, int y1, int x2, int y2, int x3, int y3, uint32_t ch) 
    220220{ 
    221221    cucul_draw_triangle(cv, x1, y1, x2, y2, x3, y3, ch); 
     
    227227} 
    228228 
    229 void Cucul::fillTriangle(int x1, int y1, int x2, int y2, int x3, int y3, unsigned long int ch) 
     229void Cucul::fillTriangle(int x1, int y1, int x2, int y2, int x3, int y3, uint32_t ch) 
    230230{ 
    231231    cucul_fill_triangle(cv, x1, y1, x2, y2, x3, y3, ch); 
     
    242242} 
    243243 
    244 int Cucul::setAttr(unsigned long int attr) 
     244int Cucul::setAttr(uint32_t attr) 
    245245{ 
    246246    return cucul_set_attr(cv, attr); 
    247247} 
    248248 
    249 unsigned long int Cucul::getAttr(int x, int y) 
     249uint32_t Cucul::getAttr(int x, int y) 
    250250{ 
    251251    return cucul_get_attr(cv, x, y); 
     
    395395} 
    396396 
    397 void Font::renderCanvas(Cucul *cv, unsigned char *buf, unsigned int x, unsigned int y, unsigned int w) 
     397void Font::renderCanvas(Cucul *cv, uint8_t *buf, unsigned int x, unsigned int y, unsigned int w) 
    398398{ 
    399399    cucul_render_canvas(cv->get_cucul_canvas_t(), font, buf, x, y, w); 
    400400} 
    401401 
    402 unsigned long int const *Font::getBlocks() 
     402uint32_t const *Font::getBlocks() 
    403403{ 
    404404    return cucul_get_font_blocks(font); 
Note: See TracChangeset for help on using the changeset viewer.