Changeset 149 in libcf for trunk/src/cf_log.c


Ignore:
Timestamp:
08/05/13 17:20:57 (11 years ago)
Author:
cheese
Message:

#1 rename context-implemented structures for readability

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/cf_log.c

    r147 r149  
    8282    size_t          length; /* data length in current */
    8383    CF_Mutex_Ctx    mutex;
    84 } CF_LOG_CTX;
     84} CF_LOG_CONTEXT;
    8585
    8686typedef struct __cf_log_array__
     
    182182
    183183static int
    184 CF_Log_Local_Flush (CF_LOG_CTX * ctx)
     184CF_Log_Local_Flush (CF_LOG_CONTEXT * ctx)
    185185{
    186186    if (CF_File_Write (ctx->fd, ctx->buffer, ctx->length) < 0)
     
    204204 */
    205205/* static */int
    206 CF_Log_Local_Push (CF_LOG_CTX   * ctx,
    207                    const char   * buffer,
    208                    const size_t demandSize)
     206CF_Log_Local_Push (CF_LOG_CONTEXT   * ctx,
     207                   const char       * buffer,
     208                   const size_t     demandSize)
    209209{
    210210    int result = CF_OK;
     
    250250CF_Log_SetMultiThread (CF_Log_Ctx ctx)
    251251{
    252     CF_LOG_CTX * context = (CF_LOG_CTX *) ctx;
     252    CF_LOG_CONTEXT * context = (CF_LOG_CONTEXT *) ctx;
    253253
    254254    ASSERT_CTX (ctx);
     
    270270CF_Log_UnsetMultiThread (CF_Log_Ctx ctx)
    271271{
    272     CF_LOG_CTX * context = (CF_LOG_CTX *) ctx;
     272    CF_LOG_CONTEXT * context = (CF_LOG_CONTEXT *) ctx;
    273273
    274274    ASSERT_CTX (ctx);
     
    299299{
    300300#define BUF_LEN 16 * 1024
    301     CF_LOG_CTX  * context = (CF_LOG_CTX *) ctx;
     301    CF_LOG_CONTEXT  * context = (CF_LOG_CONTEXT *) ctx;
    302302    char        buffer[BUF_LEN + 1] = {0x00,};
    303303    char        datetime[LOG_DATETIME_LENGTH + 1] = {0x00,};
     
    353353CF_Log_FlushCtx (CF_Log_Ctx ctx)
    354354{
    355     CF_LOG_CTX  * context = (CF_LOG_CTX *) ctx;
     355    CF_LOG_CONTEXT  * context = (CF_LOG_CONTEXT *) ctx;
    356356    int         result = 0;
    357357
     
    375375CF_Log_DestroyCtx (CF_Log_Ctx ctx)
    376376{
    377     CF_LOG_CTX * context = (CF_LOG_CTX *) ctx;
     377    CF_LOG_CONTEXT * context = (CF_LOG_CONTEXT *) ctx;
    378378
    379379    ASSERT_CTX (ctx);
     
    417417             : memsize;
    418418
    419     CF_LOG_CTX  * context = NULL;
     419    CF_LOG_CONTEXT  * context = NULL;
    420420
    421421    if (path == NULL)
     
    424424    TRY
    425425    {
    426         context = (CF_LOG_CTX *) calloc (sizeof (CF_LOG_CTX), 1);
     426        context = (CF_LOG_CONTEXT *) calloc (sizeof (CF_LOG_CONTEXT), 1);
    427427        if (context == NULL)
    428428        {
Note: See TracChangeset for help on using the changeset viewer.