Changeset 87 in libcf
- Timestamp:
- 05/11/13 00:42:10 (11 years ago)
- Location:
- trunk/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/cf_debug.c
r85 r87 125 125 { 126 126 if (i+j < len) 127 fprintf (fp, "%c", IS_READABLE_CHAR (bin[i+j]) ? bin[i+j] : '.');127 fprintf (fp, "%c", IS_READABLE_CHAR (bin[i+j]) ? bin[i+j] : '.'); 128 128 } 129 129 fprintf (fp, "\n"); … … 229 229 push->line = line; 230 230 push->caller = context->callstack.caller; 231 push->frameIndex = push->caller == NULL 232 ? 0 233 : push->caller->frameIndex + 1; 231 push->frameIndex = (push->caller) ? push->caller->frameIndex + 1 : 0; 234 232 context->callstack.caller = push; 235 233 … … 481 479 ; callstack = callstack->caller) 482 480 { 483 fprintf (fp == NULL ? stderr : fp, 484 "#%-4d %s <%s:%d>\n", 485 iter++, 486 callstack->func, 487 callstack->file, 488 callstack->line); 489 } 490 491 return CF_OK; 492 } 481 fprintf (fp, "#%-4d %s <%s:%d>\n", 482 iter++, 483 callstack->func, 484 callstack->file, 485 callstack->line); 486 } 487 488 return CF_OK; 489 } -
trunk/src/cf_log.c
r86 r87 394 394 ? LOG_BUFFER_DEFAULT_SIZE 395 395 : memsize; 396 396 397 CF_LOG_CTX * context = NULL; 397 398 … … 426 427 context->size = (size_t) size; 427 428 } 429 430 *ctx = (CF_Log_Ctx) context; 428 431 } 429 432 CATCH_IF (result < 0) 430 433 { 431 434 CF_Log_DestroyCtx ((CF_Log_Ctx) context); 432 return result; 433 } 434 435 *ctx = (CF_Log_Ctx) context; 435 } 436 436 437 437 return CF_OK; … … 674 674 return result; 675 675 676 result = (flag == CF_TRUE) 677 ? CF_Log_SetMultiThread (ctx) 678 : CF_Log_UnsetMultiThread (ctx); 676 if (flag) 677 result = CF_Log_SetMultiThread (ctx); 678 else 679 result = CF_Log_UnsetMultiThread (ctx); 679 680 680 681 return result; -
trunk/src/cf_socket.c
r85 r87 58 58 { 59 59 #if defined(_WIN32) || defined(_WIN64) 60 unsigned long mode = (boolean == CF_TRUE) ? 1 : 0;60 unsigned long mode = (boolean) ? 1 : 0; 61 61 ioctlsocket (sock, FIONBIO, &mode); 62 62 #else
Note:
See TracChangeset
for help on using the changeset viewer.