Changeset 5150:3c2925abe3ed in roaraudio
- Timestamp:
- 10/15/11 15:35:46 (13 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libroar/error.c
r5147 r5150 225 225 if ( *err != ROAR_ERROR_NONE ) { 226 226 roar_err_to_errno(); 227 } else if ( !roar_err_is_errno_clea n() ) {227 } else if ( !roar_err_is_errno_clear() ) { 228 228 roar_err_from_errno(); 229 229 } … … 231 231 232 232 int roar_err_is_errno_clean(void) { 233 roar_debug_warn_obsolete("roar_err_is_errno_clean", "roar_err_is_errno_clear", NULL); 234 return roar_err_is_errno_clear(); 235 } 236 237 int roar_err_is_errno_clear(void) { 233 238 return errno == CLEAN_ERRNO ? 1 : 0; 234 239 } … … 877 882 } 878 883 } 884 885 886 // store a error state (both libroar and system) 887 int roar_err_store(struct roar_error_state * state) { 888 if ( state == NULL ) 889 return ROAR_ERROR_FAULT; 890 891 memset(state, 0, sizeof(struct roar_error_state)); 892 893 state->refc = 0; 894 state->libroar_error = roar_error; 895 state->system_errno = errno; 896 897 return ROAR_ERROR_NONE; 898 } 899 900 // restore error state to values at time of call to roar_err_store() 901 int roar_err_restore(struct roar_error_state * state) { 902 if ( state == NULL ) 903 return ROAR_ERROR_FAULT; 904 905 roar_err_set(state->libroar_error); 906 errno = state->system_errno; 907 908 return ROAR_ERROR_NONE; 909 } 910 879 911 880 912 // phi@ph7:roaraudio $ grep '^#define ROAR_ERROR_' error.h | tr -d /\* | while read d c d t; do printf " {%-23s \"%s\"},\n" $c, "$t"; done
Note: See TracChangeset
for help on using the changeset viewer.