~ubuntu-branches/ubuntu/oneiric/imagemagick/oneiric-updates

« back to all changes in this revision

Viewing changes to magick/log.c

  • Committer: Bazaar Package Importer
  • Author(s): Nelson A. de Oliveira
  • Date: 2010-06-20 19:59:55 UTC
  • mfrom: (6.2.8 sid)
  • Revision ID: james.westby@ubuntu.com-20100620195955-n3eq0yenhycw888i
Tags: 7:6.6.2.6-1
* New upstream release;
* Change Recommends on ufraw to ufraw-batch (Closes: #579775);
* Fix FTBFS when using dash to run the configure script, by setting
  CONFIG_SHELL=/bin/bash (Closes: #582073, #583024). Thank you, Niko Tyni!

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
%                                September 2002                               %
18
18
%                                                                             %
19
19
%                                                                             %
20
 
%  Copyright 1999-2009 ImageMagick Studio LLC, a non-profit organization      %
 
20
%  Copyright 1999-2010 ImageMagick Studio LLC, a non-profit organization      %
21
21
%  dedicated to making software imaging solutions freely available.           %
22
22
%                                                                             %
23
23
%  You may not use this file except in compliance with the License.  You may  %
52
52
#include "magick/semaphore.h"
53
53
#include "magick/timer.h"
54
54
#include "magick/string_.h"
 
55
#include "magick/string-private.h"
55
56
#include "magick/token.h"
56
57
#include "magick/thread_.h"
57
58
#include "magick/thread-private.h"
111
112
    *filename,
112
113
    *format;
113
114
 
114
 
  unsigned long
 
115
  size_t
115
116
    generations,
116
117
    limit;
117
118
 
118
119
  FILE
119
120
    *file;
120
121
 
121
 
  unsigned long
 
122
  size_t
122
123
    generation;
123
124
 
124
125
  MagickBooleanType
129
130
  TimerInfo
130
131
    timer;
131
132
 
132
 
  unsigned long
 
133
  size_t
133
134
    signature;
134
135
};
135
136
 
225
226
  exception=AcquireExceptionInfo();
226
227
  log_info=GetLogInfo("*",exception);
227
228
  exception=DestroyExceptionInfo(exception);
228
 
  (void) LockSemaphoreInfo(log_semaphore);
 
229
  LockSemaphoreInfo(log_semaphore);
229
230
  if (log_info->file != (FILE *) NULL)
230
231
    {
231
232
      if (log_info->append == MagickFalse)
233
234
      (void) fclose(log_info->file);
234
235
      log_info->file=(FILE *) NULL;
235
236
    }
236
 
  (void) UnlockSemaphoreInfo(log_semaphore);
 
237
  UnlockSemaphoreInfo(log_semaphore);
237
238
}
238
239
 
239
240
/*
278
279
  /*
279
280
    Search for log tag.
280
281
  */
281
 
  (void) LockSemaphoreInfo(log_semaphore);
 
282
  LockSemaphoreInfo(log_semaphore);
282
283
  ResetLinkedListIterator(log_list);
283
284
  p=(LogInfo *) GetNextValueInLinkedList(log_list);
284
285
  while (p != (LogInfo *) NULL)
290
291
  if (p != (LogInfo *) NULL)
291
292
    (void) InsertValueInLinkedList(log_list,0,
292
293
      RemoveElementByValueFromLinkedList(log_list,p));
293
 
  (void) UnlockSemaphoreInfo(log_semaphore);
 
294
  UnlockSemaphoreInfo(log_semaphore);
294
295
  return(p);
295
296
}
296
297
 
310
311
%  The format of the GetLogInfoList function is:
311
312
%
312
313
%      const LogInfo **GetLogInfoList(const char *pattern,
313
 
%        unsigned long *number_preferences,ExceptionInfo *exception)
 
314
%        size_t *number_preferences,ExceptionInfo *exception)
314
315
%
315
316
%  A description of each parameter follows:
316
317
%
343
344
#endif
344
345
 
345
346
MagickExport const LogInfo **GetLogInfoList(const char *pattern,
346
 
  unsigned long *number_preferences,ExceptionInfo *exception)
 
347
  size_t *number_preferences,ExceptionInfo *exception)
347
348
{
348
349
  const LogInfo
349
350
    **preferences;
351
352
  register const LogInfo
352
353
    *p;
353
354
 
354
 
  register long
 
355
  register ssize_t
355
356
    i;
356
357
 
357
358
  /*
359
360
  */
360
361
  assert(pattern != (char *) NULL);
361
362
  (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",pattern);
362
 
  assert(number_preferences != (unsigned long *) NULL);
 
363
  assert(number_preferences != (size_t *) NULL);
363
364
  *number_preferences=0;
364
365
  p=GetLogInfo("*",exception);
365
366
  if (p == (const LogInfo *) NULL)
371
372
  /*
372
373
    Generate log list.
373
374
  */
374
 
  (void) LockSemaphoreInfo(log_semaphore);
 
375
  LockSemaphoreInfo(log_semaphore);
375
376
  ResetLinkedListIterator(log_list);
376
377
  p=(const LogInfo *) GetNextValueInLinkedList(log_list);
377
378
  for (i=0; p != (const LogInfo *) NULL; )
381
382
      preferences[i++]=p;
382
383
    p=(const LogInfo *) GetNextValueInLinkedList(log_list);
383
384
  }
384
 
  (void) UnlockSemaphoreInfo(log_semaphore);
 
385
  UnlockSemaphoreInfo(log_semaphore);
385
386
  qsort((void *) preferences,(size_t) i,sizeof(*preferences),LogInfoCompare);
386
387
  preferences[i]=(LogInfo *) NULL;
387
 
  *number_preferences=(unsigned long) i;
 
388
  *number_preferences=(size_t) i;
388
389
  return(preferences);
389
390
}
390
391
 
403
404
%
404
405
%  The format of the GetLogList function is:
405
406
%
406
 
%      char **GetLogList(const char *pattern,unsigned long *number_preferences,
 
407
%      char **GetLogList(const char *pattern,size_t *number_preferences,
407
408
%        ExceptionInfo *exception)
408
409
%
409
410
%  A description of each parameter follows:
436
437
#endif
437
438
 
438
439
MagickExport char **GetLogList(const char *pattern,
439
 
  unsigned long *number_preferences,ExceptionInfo *exception)
 
440
  size_t *number_preferences,ExceptionInfo *exception)
440
441
{
441
442
  char
442
443
    **preferences;
444
445
  register const LogInfo
445
446
    *p;
446
447
 
447
 
  register long
 
448
  register ssize_t
448
449
    i;
449
450
 
450
451
  /*
452
453
  */
453
454
  assert(pattern != (char *) NULL);
454
455
  (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",pattern);
455
 
  assert(number_preferences != (unsigned long *) NULL);
 
456
  assert(number_preferences != (size_t *) NULL);
456
457
  *number_preferences=0;
457
458
  p=GetLogInfo("*",exception);
458
459
  if (p == (const LogInfo *) NULL)
464
465
  /*
465
466
    Generate log list.
466
467
  */
467
 
  (void) LockSemaphoreInfo(log_semaphore);
 
468
  LockSemaphoreInfo(log_semaphore);
468
469
  ResetLinkedListIterator(log_list);
469
470
  p=(const LogInfo *) GetNextValueInLinkedList(log_list);
470
471
  for (i=0; p != (const LogInfo *) NULL; )
474
475
      preferences[i++]=ConstantString(p->name);
475
476
    p=(const LogInfo *) GetNextValueInLinkedList(log_list);
476
477
  }
477
 
  (void) UnlockSemaphoreInfo(log_semaphore);
 
478
  UnlockSemaphoreInfo(log_semaphore);
478
479
  qsort((void *) preferences,(size_t) i,sizeof(*preferences),LogCompare);
479
480
  preferences[i]=(char *) NULL;
480
 
  *number_preferences=(unsigned long) i;
 
481
  *number_preferences=(size_t) i;
481
482
  return(preferences);
482
483
}
483
484
 
532
533
    {
533
534
      if (log_semaphore == (SemaphoreInfo *) NULL)
534
535
        AcquireSemaphoreInfo(&log_semaphore);
535
 
      (void) LockSemaphoreInfo(log_semaphore);
 
536
      LockSemaphoreInfo(log_semaphore);
536
537
      if ((log_list == (LinkedListInfo *) NULL) &&
537
538
          (instantiate_log == MagickFalse))
538
539
        {
539
540
          (void) LoadLogLists(LogFilename,exception);
540
541
          instantiate_log=MagickTrue;
541
542
        }
542
 
      (void) UnlockSemaphoreInfo(log_semaphore);
 
543
      UnlockSemaphoreInfo(log_semaphore);
543
544
    }
544
545
  return(log_list != (LinkedListInfo *) NULL ? MagickTrue : MagickFalse);
545
546
}
616
617
  const LogInfo
617
618
    **log_info;
618
619
 
619
 
  long
 
620
  ssize_t
620
621
    j;
621
622
 
622
 
  register long
 
623
  register ssize_t
623
624
    i;
624
625
 
625
 
  unsigned long
 
626
  size_t
626
627
    number_aliases;
627
628
 
628
629
  if (file == (const FILE *) NULL)
632
633
    return(MagickFalse);
633
634
  j=0;
634
635
  path=(const char *) NULL;
635
 
  for (i=0; i < (long) number_aliases; i++)
 
636
  for (i=0; i < (ssize_t) number_aliases; i++)
636
637
  {
637
638
    if (log_info[i]->stealth != MagickFalse)
638
639
      continue;
649
650
    if (log_info[i]->filename != (char *) NULL)
650
651
      {
651
652
        (void) fprintf(file,"%s",log_info[i]->filename);
652
 
        for (j=(long) strlen(log_info[i]->filename); j <= 16; j++)
 
653
        for (j=(ssize_t) strlen(log_info[i]->filename); j <= 16; j++)
653
654
          (void) fprintf(file," ");
654
655
      }
655
 
    (void) fprintf(file,"%9lu  ",log_info[i]->generations);
656
 
    (void) FormatMagickSize(MegabytesToBytes(log_info[i]->limit),limit);
657
 
    (void) fprintf(file,"%8s  ",limit);
 
656
    (void) fprintf(file,"%9g  ",(double) log_info[i]->generations);
 
657
    (void) FormatMagickSize(MegabytesToBytes(log_info[i]->limit),MagickFalse,
 
658
      limit);
 
659
    (void) fprintf(file,"%8sB  ",limit);
658
660
    if (log_info[i]->format != (char *) NULL)
659
661
      (void) fprintf(file,"%s",log_info[i]->format);
660
662
    (void) fprintf(file,"\n");
737
739
{
738
740
  if (log_semaphore == (SemaphoreInfo *) NULL)
739
741
    AcquireSemaphoreInfo(&log_semaphore);
740
 
  (void) LockSemaphoreInfo(log_semaphore);
 
742
  LockSemaphoreInfo(log_semaphore);
741
743
  if (log_list != (LinkedListInfo *) NULL)
742
744
    log_list=DestroyLinkedList(log_list,DestroyLogElement);
743
745
  instantiate_log=MagickFalse;
744
 
  (void) UnlockSemaphoreInfo(log_semaphore);
 
746
  UnlockSemaphoreInfo(log_semaphore);
745
747
  DestroySemaphoreInfo(&log_semaphore);
746
748
}
747
749
 
762
764
%  The format of the LogMagickEvent method is:
763
765
%
764
766
%      MagickBooleanType LogMagickEvent(const LogEventType type,
765
 
%        const char *module,const char *function,const unsigned long line,
 
767
%        const char *module,const char *function,const size_t line,
766
768
%        const char *format,...)
767
769
%
768
770
%  A description of each parameter follows:
779
781
%
780
782
*/
781
783
static char *TranslateEvent(const LogEventType magick_unused(type),
782
 
  const char *module,const char *function,const unsigned long line,
 
784
  const char *module,const char *function,const size_t line,
783
785
  const char *domain,const char *event)
784
786
{
785
787
  char
829
831
      (void) FormatMagickString(text,extent,
830
832
        "<entry>\n"
831
833
        "  <timestamp>%s</timestamp>\n"
832
 
        "  <elapsed-time>%ld:%02ld.%03ld</elapsed-time>\n"
 
834
        "  <elapsed-time>%lu:%02lu.%03lu</elapsed-time>\n"
833
835
        "  <user-time>%0.3f</user-time>\n"
834
 
        "  <process-id>%ld</process-id>\n"
835
 
        "  <thread-id>%lu</thread-id>\n"
 
836
        "  <process-id>%.20g</process-id>\n"
 
837
        "  <thread-id>%.20g</thread-id>\n"
836
838
        "  <module>%s</module>\n"
837
839
        "  <function>%s</function>\n"
838
 
        "  <line>%lu</line>\n"
 
840
        "  <line>%.20g</line>\n"
839
841
        "  <domain>%s</domain>\n"
840
842
        "  <event>%s</event>\n"
841
 
        "</entry>",timestamp,(long) (elapsed_time/60.0),(long)
842
 
        floor(fmod(elapsed_time,60.0)),(long) (1000.0*(elapsed_time-
843
 
        floor(elapsed_time))+0.5),user_time,(long) getpid(),
844
 
        GetMagickThreadSignature(),module,function,line,domain,event);
 
843
        "</entry>",timestamp,(unsigned long) (elapsed_time/60.0),
 
844
        (unsigned long) floor(fmod(elapsed_time,60.0)),(unsigned long)
 
845
        (1000.0*(elapsed_time-floor(elapsed_time))+0.5),user_time,
 
846
        (double) getpid(),(double) GetMagickThreadSignature(),module,function,
 
847
        (double) line,domain,event);
845
848
      return(text);
846
849
    }
847
850
  /*
928
931
            q++;
929
932
            break;
930
933
          }
931
 
        q+=FormatMagickString(q,extent,"%lu",log_info->generation %
932
 
          log_info->generations);
 
934
        q+=FormatMagickString(q,extent,"%.20g",(double) (log_info->generation %
 
935
          log_info->generations));
933
936
        break;
934
937
      }
935
938
      case 'l':
936
939
      {
937
 
        q+=FormatMagickString(q,extent,"%lu",line);
 
940
        q+=FormatMagickString(q,extent,"%.20g",(double) line);
938
941
        break;
939
942
      }
940
943
      case 'm':
958
961
      }
959
962
      case 'p':
960
963
      {
961
 
        q+=FormatMagickString(q,extent,"%ld",(long) getpid());
 
964
        q+=FormatMagickString(q,extent,"%.20g",(double) getpid());
962
965
        break;
963
966
      }
964
967
      case 'r':
965
968
      {
966
 
        q+=FormatMagickString(q,extent,"%ld:%02ld.%03ld",(long)
967
 
          (elapsed_time/60.0),(long) floor(fmod(elapsed_time,60.0)),
968
 
          (long) (1000.0*(elapsed_time-floor(elapsed_time))+0.5));
 
969
        q+=FormatMagickString(q,extent,"%lu:%02lu.%03lu",(unsigned long)
 
970
          (elapsed_time/60.0),(unsigned long) floor(fmod(elapsed_time,60.0)),
 
971
          (unsigned long) (1000.0*(elapsed_time-floor(elapsed_time))+0.5));
969
972
        break;
970
973
      }
971
974
      case 't':
1065
1068
            q++;
1066
1069
            break;
1067
1070
          }
1068
 
        q+=FormatMagickString(q,extent,"%lu",log_info->generation %
1069
 
          log_info->generations);
 
1071
        q+=FormatMagickString(q,extent,"%.20g",(double) (log_info->generation %
 
1072
          log_info->generations));
1070
1073
        break;
1071
1074
      }
1072
1075
      case 'n':
1076
1079
      }
1077
1080
      case 'p':
1078
1081
      {
1079
 
        q+=FormatMagickString(q,extent,"%ld",(long) getpid());
 
1082
        q+=FormatMagickString(q,extent,"%.20g",(double) getpid());
1080
1083
        break;
1081
1084
      }
1082
1085
      case 'v':
1102
1105
}
1103
1106
 
1104
1107
MagickBooleanType LogMagickEventList(const LogEventType type,const char *module,
1105
 
  const char *function,const unsigned long line,const char *format,
 
1108
  const char *function,const size_t line,const char *format,
1106
1109
  va_list operands)
1107
1110
{
1108
1111
  char
1126
1129
  exception=AcquireExceptionInfo();
1127
1130
  log_info=(LogInfo *) GetLogInfo("*",exception);
1128
1131
  exception=DestroyExceptionInfo(exception);
1129
 
  (void) LockSemaphoreInfo(log_semaphore);
 
1132
  LockSemaphoreInfo(log_semaphore);
1130
1133
  if ((log_info->event_mask & type) == 0)
1131
1134
    {
1132
 
      (void) UnlockSemaphoreInfo(log_semaphore);
 
1135
      UnlockSemaphoreInfo(log_semaphore);
1133
1136
      return(MagickTrue);
1134
1137
    }
1135
1138
  domain=MagickOptionToMnemonic(MagickLogEventOptions,type);
1144
1147
  if (text == (char *) NULL)
1145
1148
    {
1146
1149
      (void) ContinueTimer((TimerInfo *) &log_info->timer);
1147
 
      (void) UnlockSemaphoreInfo(log_semaphore);
 
1150
      UnlockSemaphoreInfo(log_semaphore);
1148
1151
      return(MagickFalse);
1149
1152
    }
1150
1153
  if ((log_info->handler_mask & ConsoleHandler) != 0)
1154
1157
    }
1155
1158
  if ((log_info->handler_mask & DebugHandler) != 0)
1156
1159
    {
1157
 
#if defined(__WINDOWS__)
 
1160
#if defined(MAGICKCORE_WINDOWS_SUPPORT)
1158
1161
      OutputDebugString(text);
1159
1162
#endif
1160
1163
    }
1161
1164
  if ((log_info->handler_mask & EventHandler) != 0)
1162
1165
    {
1163
 
#if defined(__WINDOWS__)
 
1166
#if defined(MAGICKCORE_WINDOWS_SUPPORT)
1164
1167
      (void) NTReportEvent(text,MagickFalse);
1165
1168
#endif
1166
1169
    }
1187
1190
          if (filename == (char *) NULL)
1188
1191
            {
1189
1192
              (void) ContinueTimer((TimerInfo *) &log_info->timer);
1190
 
              (void) UnlockSemaphoreInfo(log_semaphore);
 
1193
              UnlockSemaphoreInfo(log_semaphore);
1191
1194
              return(MagickFalse);
1192
1195
            }
1193
1196
          log_info->append=IsPathAccessible(filename);
1195
1198
          filename=(char  *) RelinquishMagickMemory(filename);
1196
1199
          if (log_info->file == (FILE *) NULL)
1197
1200
            {
1198
 
              (void) UnlockSemaphoreInfo(log_semaphore);
 
1201
              UnlockSemaphoreInfo(log_semaphore);
1199
1202
              return(MagickFalse);
1200
1203
            }
1201
1204
          log_info->generation++;
1221
1224
    }
1222
1225
  text=(char  *) RelinquishMagickMemory(text);
1223
1226
  (void) ContinueTimer((TimerInfo *) &log_info->timer);
1224
 
  (void) UnlockSemaphoreInfo(log_semaphore);
 
1227
  UnlockSemaphoreInfo(log_semaphore);
1225
1228
  return(MagickTrue);
1226
1229
}
1227
1230
 
1228
1231
MagickBooleanType LogMagickEvent(const LogEventType type,const char *module,
1229
 
  const char *function,const unsigned long line,const char *format,...)
 
1232
  const char *function,const size_t line,const char *format,...)
1230
1233
{
1231
1234
  va_list
1232
1235
    operands;
1257
1260
%  The format of the LoadLogList method is:
1258
1261
%
1259
1262
%      MagickBooleanType LoadLogList(const char *xml,const char *filename,
1260
 
%        const unsigned long depth,ExceptionInfo *exception)
 
1263
%        const size_t depth,ExceptionInfo *exception)
1261
1264
%
1262
1265
%  A description of each parameter follows:
1263
1266
%
1271
1274
%
1272
1275
*/
1273
1276
static MagickBooleanType LoadLogList(const char *xml,const char *filename,
1274
 
  const unsigned long depth,ExceptionInfo *exception)
 
1277
  const size_t depth,ExceptionInfo *exception)
1275
1278
{
1276
1279
  char
1277
1280
    keyword[MaxTextExtent],
1377
1380
        /*
1378
1381
          Allocate memory for the log list.
1379
1382
        */
1380
 
        log_info=(LogInfo *) AcquireMagickMemory(sizeof(*log_info));
 
1383
        log_info=(LogInfo *) AcquireAlignedMemory(1,sizeof(*log_info));
1381
1384
        if (log_info == (LogInfo *) NULL)
1382
1385
          ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
1383
1386
        (void) ResetMagickMemory(log_info,0,sizeof(*log_info));
1446
1449
                log_info->generations=(~0UL);
1447
1450
                break;
1448
1451
              }
1449
 
            log_info->generations=(unsigned long) atol(token);
 
1452
            log_info->generations=StringToUnsignedLong(token);
1450
1453
            break;
1451
1454
          }
1452
1455
        break;
1461
1464
                log_info->limit=(~0UL);
1462
1465
                break;
1463
1466
              }
1464
 
            log_info->limit=(unsigned long) atol(token);
 
1467
            log_info->limit=StringToUnsignedLong(token);
1465
1468
            break;
1466
1469
          }
1467
1470
        break;
1525
1528
  MagickStatusType
1526
1529
    status;
1527
1530
 
1528
 
  register long
 
1531
  register ssize_t
1529
1532
    i;
1530
1533
 
1531
1534
  /*
1542
1545
          return(MagickFalse);
1543
1546
        }
1544
1547
    }
1545
 
  for (i=0; i < (long) (sizeof(LogMap)/sizeof(*LogMap)); i++)
 
1548
  for (i=0; i < (ssize_t) (sizeof(LogMap)/sizeof(*LogMap)); i++)
1546
1549
  {
1547
1550
    LogInfo
1548
1551
      *log_info;
1551
1554
      *p;
1552
1555
 
1553
1556
    p=LogMap+i;
1554
 
    log_info=(LogInfo *) AcquireMagickMemory(sizeof(*log_info));
 
1557
    log_info=(LogInfo *) AcquireAlignedMemory(1,sizeof(*log_info));
1555
1558
    if (log_info == (LogInfo *) NULL)
1556
1559
      {
1557
1560
        (void) ThrowMagickException(exception,GetMagickModule(),
1563
1566
    GetTimerInfo((TimerInfo *) &log_info->timer);
1564
1567
    log_info->event_mask=p->event_mask;
1565
1568
    log_info->handler_mask=p->handler_mask;
1566
 
    log_info->filename=(char *) p->filename;
1567
 
    log_info->format=(char *) p->format;
 
1569
    log_info->filename=ConstantString(p->filename);
 
1570
    log_info->format=ConstantString(p->format);
1568
1571
    log_info->exempt=MagickTrue;
1569
1572
    log_info->signature=MagickSignature;
1570
1573
    status=AppendValueToLinkedList(log_list,log_info);
1618
1621
  register const char
1619
1622
    *p;
1620
1623
 
1621
 
  register long
 
1624
  register ssize_t
1622
1625
    i;
1623
1626
 
1624
1627
  size_t
1677
1680
  LogInfo
1678
1681
    *log_info;
1679
1682
 
1680
 
  long
 
1683
  ssize_t
1681
1684
    option;
1682
1685
 
1683
1686
  exception=AcquireExceptionInfo();
1684
1687
  log_info=(LogInfo *) GetLogInfo("*",exception);
1685
1688
  exception=DestroyExceptionInfo(exception);
1686
1689
  option=ParseMagickOption(MagickLogEventOptions,MagickTrue,events);
1687
 
  (void) LockSemaphoreInfo(log_semaphore);
 
1690
  LockSemaphoreInfo(log_semaphore);
1688
1691
  log_info=(LogInfo *) GetValueFromLinkedList(log_list,0);
1689
1692
  log_info->event_mask=(LogEventType) option;
1690
1693
  if (option == -1)
1691
1694
    log_info->event_mask=UndefinedEvents;
1692
 
  (void) UnlockSemaphoreInfo(log_semaphore);
 
1695
  UnlockSemaphoreInfo(log_semaphore);
1693
1696
  return(log_info->event_mask);
1694
1697
}
1695
1698
 
1726
1729
  exception=AcquireExceptionInfo();
1727
1730
  log_info=(LogInfo *) GetLogInfo("*",exception);
1728
1731
  exception=DestroyExceptionInfo(exception);
1729
 
  (void) LockSemaphoreInfo(log_semaphore);
 
1732
  LockSemaphoreInfo(log_semaphore);
1730
1733
  if (log_info->format != (char *) NULL)
1731
1734
    log_info->format=DestroyString(log_info->format);
1732
1735
  log_info->format=ConstantString(format);
1733
 
  (void) UnlockSemaphoreInfo(log_semaphore);
 
1736
  UnlockSemaphoreInfo(log_semaphore);
1734
1737
}
1735
1738
 
1736
1739
/*