Ticket #2519: inline_to_define.patch

File inline_to_define.patch, 739 bytes (added by pavlinux, 13 years ago)
  • lib/util.h

    diff --git a/lib/util.h b/lib/util.h
    index a6aa3a4..6ccad7a 100644
    a b char *guess_message_value (void); 
    188188 
    189189/*** inline functions **************************************************/ 
    190190 
    191 static inline gboolean 
    192 exist_file (const char *name) 
    193 { 
    194     return (access (name, R_OK) == 0); 
    195 } 
     191#define exist_file(name) ((gboolean) (access(name, R_OK))) 
    196192 
    197 static inline gboolean 
    198 is_exe (mode_t mode) 
    199 { 
    200     return (gboolean) ((S_IXUSR & mode) || (S_IXGRP & mode) || (S_IXOTH & mode)); 
    201 } 
     193#define is_exe(__mode) ((gboolean)((S_IXUSR & __mode)  || \ 
     194                                   (S_IXGRP & __mode)  || \ 
     195                                   (S_IXOTH & __mode))) 
    202196 
    203197#endif /* MC_UTIL_H */