Ignore:
Timestamp:
Nov 12, 2006, 4:26:13 PM (13 years ago)
Author:
Sam Hocevar
Message:
  • Got rid of HAVE_ERRNO_H ifdefs by defining seterrno()/geterrno() functions.
  • More debugging information in the import/export and font functions.
Location:
libcaca/trunk/caca
Files:
2 edited

Legend:

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

    r1208 r1362  
    2525#   include <string.h>
    2626#   include <stdio.h>
    27 #   if defined(HAVE_ERRNO_H)
    28 #       include <errno.h>
    29 #   endif
    3027#   if defined(USE_PLUGINS)
    3128#       if defined(HAVE_DLFCN_H)
     
    7067    if(!dp)
    7168    {
    72 #if defined(HAVE_ERRNO_H)
    73         errno = ENOMEM;
    74 #endif
     69        seterrno(ENOMEM);
    7570        return NULL;
    7671    }
     
    8883#endif
    8984        free(dp);
    90 #if defined(HAVE_ERRNO_H)
    91         errno = ENODEV;
    92 #endif
     85        seterrno(ENODEV);
    9386        return NULL;
    9487    }
     
    10194#endif
    10295        free(dp);
    103 #if defined(HAVE_ERRNO_H)
    104         errno = ENODEV;
    105 #endif
     96        seterrno(ENODEV);
    10697        return NULL;
    10798    }
  • libcaca/trunk/caca/graphics.c

    r1231 r1362  
    1919#include "common.h"
    2020
    21 #if !defined(__KERNEL__)
    22 #   if defined(HAVE_ERRNO_H)
    23 #       include <errno.h>
    24 #   endif
    25 #endif
    26 
    2721#include "caca.h"
    2822#include "caca_internals.h"
     
    4640    int ret = dp->drv.set_display_title(dp, title);
    4741
    48 #if defined(HAVE_ERRNO_H)
    4942    if(ret)
    50         errno = ENOSYS;
    51 #endif
     43        seterrno(ENOSYS);
    5244
    5345    return ret;
     
    196188    if(!dp->drv.set_mouse)
    197189    {
    198 #if defined(HAVE_ERRNO_H)
    199         errno = ENOSYS;
    200 #endif
     190        seterrno(ENOSYS);
    201191        return -1;
    202192    }
Note: See TracChangeset for help on using the changeset viewer.