当前位置: 首页>>代码示例>>C++>>正文


C++ GetClientName函数代码示例

本文整理汇总了C++中GetClientName函数的典型用法代码示例。如果您正苦于以下问题:C++ GetClientName函数的具体用法?C++ GetClientName怎么用?C++ GetClientName使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了GetClientName函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: KeyringUsage

static void KeyringUsage()
{
  static const char
    *options[]=
    {
      "-debug events        display copious debugging information",
      "-export id           export a key from your keyring",
      "-help                print program options",
      "-list type           print a list of supported option arguments",
      "-log format          format of debugging information",
      "-version             print version information",
      (char *) NULL
    };

  const char
    **p;

  (void) fprintf(stdout,"Version: %s\n",GetWizardVersion(
    (size_t *) NULL));
  (void) fprintf(stdout,"Copyright: %s\n\n",GetWizardCopyright());
  (void) fprintf(stdout,"Usage: %s [options ...] [ keyring ...] keyring.rdf\n",
    GetClientName());
  (void) fprintf(stdout,"       %s [options ...] -export id [ keyring ...] "
    "keyring.xdm\n",GetClientName());
  (void) fprintf(stdout,"\nWhere options include:\n");
  for (p=options; *p != (char *) NULL; p++)
    (void) fprintf(stdout,"  %s\n",*p);
  exit(0);
}
开发者ID:ImageMagick,项目名称:WizardsToolkit,代码行数:29,代码来源:keyring.c

示例2: ValidateUsage

static MagickBooleanType ValidateUsage(void)
{
  const char
    **p;

  static const char
    *miscellaneous[]=
    {
      "-debug events        display copious debugging information",
      "-help                print program options",
      "-log format          format of debugging information",
      "-validate type       validation type",
      "-version             print version information",
      (char *) NULL
    },
    *settings[]=
    {
      "-regard-warnings     pay attention to warning messages",
      "-verbose             print detailed information about the image",
      (char *) NULL
    };

  (void) printf("Version: %s\n",GetMagickVersion((unsigned long *) NULL));
  (void) printf("Copyright: %s\n\n",GetMagickCopyright());
  (void) printf("Usage: %s [options ...] reference-file\n",GetClientName());
  (void) printf("\nValidate Settings:\n");
  for (p=settings; *p != (char *) NULL; p++)
    (void) printf("  %s\n",*p);
  (void) printf("\nMiscellaneous Options:\n");
  for (p=miscellaneous; *p != (char *) NULL; p++)
    (void) printf("  %s\n",*p);
  return(MagickTrue);
}
开发者ID:wrv,项目名称:CircleSquareFuzzing,代码行数:33,代码来源:validate.c

示例3: ConjureUsage

static void ConjureUsage(void)
{
  const char
    **p;

  static const char
    *settings[]=
    {
      "-debug events        display copious debugging information",
      "-help                print program options",
      "-log format          format of debugging information",
      "-monitor             monitor progress",
      "-quiet               suppress all warning messages",
      "-regard-warnings     pay attention to warning messages",
      "-seed value          seed a new sequence of pseudo-random numbers",
      "-verbose             print detailed information about the image",
      "-version             print version information",
      (char *) NULL
    };

  (void) printf("Version: %s\n",GetMagickVersion((unsigned long *) NULL));
  (void) printf("Copyright: %s\n\n",GetMagickCopyright());
  (void) printf("Usage: %s [options ...] file [ [options ...] file ...]\n",
    GetClientName());
  (void) printf("\nImage Settings:\n");
  for (p=settings; *p != (char *) NULL; p++)
    (void) printf("  %s\n",*p);
  (void) printf("\nIn additiion, define any key value pairs required by "
    "your script.  For\nexample,\n\n");
  (void) printf("    conjure -size 100x100 -color blue -foo bar script.msl\n");
  exit(0);
}
开发者ID:vazexqi,项目名称:ParsecPipelineParallelism,代码行数:32,代码来源:conjure.c

示例4: DefaultErrorHandler

static void DefaultErrorHandler(const ExceptionType severity,const char *reason,
  const char *description)
{
  if (reason == (char *) NULL)
    return;

  (void) fprintf(stderr,"%.1024s: ",GetClientName());
  if (strstr(reason,"%s") && description)
    {
      /*
        Reason contains printf specification. %s in reason string
        is substituted with description.
      */
      (void) fprintf(stderr,reason,description);
    }
  else
    {
      (void) fprintf(stderr,"%.1024s",reason);
      if (description != (char *) NULL)
        (void) fprintf(stderr," (%.1024s)",description);
    }
  if ((severity != OptionError) && errno)
    (void) fprintf(stderr," [%.1024s]",GetErrorMessageString(errno));
  (void) fprintf(stderr,".\n");
}
开发者ID:hank2015,项目名称:testCMS,代码行数:25,代码来源:error.c

示例5: va_start

void CGameClient::Disconnect( const char *fmt, ... )
{
	va_list		argptr;
	char		reason[1024];

	if ( m_nSignonState == SIGNONSTATE_NONE )
		return;	// no recursion

	va_start (argptr,fmt);
	Q_vsnprintf (reason, sizeof( reason ), fmt,argptr);
	va_end (argptr);

	// notify other clients of player leaving the game
	// send the username and network id so we don't depend on the CBasePlayer pointer
	IGameEvent *event = g_GameEventManager.CreateEvent( "player_disconnect" );

	if ( event )
	{
		event->SetInt("userid", GetUserID() );
		event->SetString("reason", reason );
		event->SetString("name", GetClientName() );
		event->SetString("networkid", GetNetworkIDString() ); 
		g_GameEventManager.FireEvent( event );
	}

	m_Server->RemoveClientFromGame( this );

	CBaseClient::Disconnect( "%s", reason );
}
开发者ID:Axitonium,项目名称:SourceEngine2007,代码行数:29,代码来源:sv_client.cpp

示例6: MagickUsage

static void MagickUsage(MagickBooleanType verbose)
{
  const char
    *name;

  size_t
    len;

  name=GetClientName();
  len=strlen(name);

  if (len>=7 && LocaleCompare("convert",name+len-7) == 0) {
    /* convert usage */
    (void) FormatLocaleFile(stdout,
       "Usage: %s [ {option} | {image} ... ] {output_image}\n",name);
    (void) FormatLocaleFile(stdout,
       "       %s -help | -version | -usage | -list {option}\n\n",name);
    return;
  }
  else if (len>=6 && LocaleCompare("script",name+len-6) == 0) {
    /* magick-script usage */
    (void) FormatLocaleFile(stdout,
      "Usage: %s {filename} [ {script_args} ... ]\n",name);
  }
  else {
    /* magick usage */
    (void) FormatLocaleFile(stdout,
       "Usage: %s [ {option} | {image} ... ] {output_image}\n",name);
    (void) FormatLocaleFile(stdout,
       "       %s [ {option} | {image} ... ] -script {filename} [ {script_args} ...]\n",
       name);
  }
  (void) FormatLocaleFile(stdout,
    "       %s -help | -version | -usage | -list {option}\n\n",name);

  if (verbose == MagickFalse)
    return;

  (void) FormatLocaleFile(stdout,"%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s\n",
    "All options are performed in a strict 'as you see them' order\n",
    "You must read-in images before you can operate on them.\n",
    "\n",
    "Magick Script files can use any of the following forms...\n",
    "     #!/path/to/magick -script\n",
    "or\n",
    "     #!/bin/sh\n",
    "     :; exec magick -script \"$0\" \"[email protected]\"; exit 10\n",
    "     # Magick script from here...\n",
    "or\n",
    "     #!/usr/bin/env  magick-script\n",
    "The latter two forms do not require the path to the command hard coded.\n",
    "Note: \"magick-script\" needs to be linked to the \"magick\" command.\n",
    "\n",
    "For more information on usage, options, examples, and techniques\n",
    "see the ImageMagick website at    ", MagickAuthoritativeURL);

  return;
}
开发者ID:JimBobSquarePants,项目名称:ImageMagick,代码行数:58,代码来源:magick-cli.c

示例7: DefaultWarningHandler

/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                                                                             %
%                                                                             %
%                                                                             %
+   D e f a u l t W a r n i n g H a n d l e r                                 %
%                                                                             %
%                                                                             %
%                                                                             %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%  DefaultWarningHandler() displays a warning reason.
%
%  The format of the DefaultWarningHandler method is:
%
%      void DefaultWarningHandler(const ExceptionType severity,
%        const char *reason,const char *description)
%
%  A description of each parameter follows:
%
%    o severity: Specifies the numeric warning category.
%
%    o reason: Specifies the reason to display before terminating the
%      program.
%
%    o description: Specifies any description to the reason.
%
*/
static void DefaultWarningHandler(const ExceptionType magick_unused(severity),
  const char *reason,const char *description)
{
  if (reason == (char *) NULL)
    return;
  (void) FormatLocaleFile(stderr,"%s: %s",GetClientName(),reason);
  if (description != (char *) NULL)
    (void) FormatLocaleFile(stderr," (%s)",description);
  (void) FormatLocaleFile(stderr,".\n");
  (void) fflush(stderr);
}
开发者ID:Distrotech,项目名称:ImageMagick,代码行数:39,代码来源:exception.c

示例8: DefaultWarningHandler

/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                                                                             %
%                                                                             %
%                                                                             %
+   D e f a u l t W a r n i n g H a n d l e r                                 %
%                                                                             %
%                                                                             %
%                                                                             %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%  Method DefaultWarningHandler displays a warning reason.
%
%  The format of the DefaultWarningHandler method is:
%
%      void DefaultWarningHandler(const ExceptionType warning,
%        const char *reason,const char *description)
%
%  A description of each parameter follows:
%
%    o warning: Specifies the numeric warning category.
%
%    o reason: Specifies the reason to display before terminating the
%      program.
%
%    o description: Specifies any description to the reason.
%
%
*/
static void DefaultWarningHandler(const ExceptionType severity,
  const char *reason,const char *description)
{
  if (reason == (char *) NULL)
    return;
  (void) fprintf(stderr,"%.1024s: %.1024s",GetClientName(),reason);
  if (description != (char *) NULL)
    (void) fprintf(stderr," (%.1024s)",description);
  if ((severity != OptionWarning) && errno)
    (void) fprintf(stderr," [%.1024s]",GetErrorMessageString(errno));
  (void) fprintf(stderr,".\n");
}
开发者ID:hank2015,项目名称:testCMS,代码行数:41,代码来源:error.c

示例9: DefaultFatalErrorHandler

/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                                                                             %
%                                                                             %
%                                                                             %
+   D e f a u l t F a t a l E r r o r H a n d l e r                           %
%                                                                             %
%                                                                             %
%                                                                             %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%  DefaultFatalErrorHandler() displays an error reason and then terminates the
%  program.
%
%  The format of the DefaultFatalErrorHandler method is:
%
%      void MagickFatalError(const ExceptionType severity,const char *reason,
%        const char *description)
%
%  A description of each parameter follows:
%
%    o severity: Specifies the numeric error category.
%
%    o reason: Specifies the reason to display before terminating the program.
%
%    o description: Specifies any description to the reason.
%
*/
static void DefaultFatalErrorHandler(const ExceptionType severity,
  const char *reason,const char *description)
{
  if (reason == (char *) NULL)
    return;
  (void) FormatLocaleFile(stderr,"%s: %s",GetClientName(),reason);
  if (description != (char *) NULL)
    (void) FormatLocaleFile(stderr," (%s)",description);
  (void) FormatLocaleFile(stderr,".\n");
  (void) fflush(stderr);
  MagickCoreTerminus();
  exit((int) (severity-FatalErrorException)+1);
}
开发者ID:Distrotech,项目名称:ImageMagick,代码行数:41,代码来源:exception.c

示例10: LocaleFatalErrorHandler

static void LocaleFatalErrorHandler(
  const ExceptionType magick_unused(severity),
  const char *reason,const char *description)
{
  if (reason == (char *) NULL)
    return;
  (void) fprintf(stderr,"%s: %s",GetClientName(),reason);
  if (description != (char *) NULL)
    (void) fprintf(stderr," (%s)",description);
  (void) fprintf(stderr,".\n");
  (void) fflush(stderr);
  exit(1);
}
开发者ID:0xPr0xy,项目名称:ImageMagick,代码行数:13,代码来源:locale.c

示例11: V_snprintf

bool CGameClient::ProcessFileCRCCheck( CLC_FileCRCCheck *msg )
{
	// Ignore this message if we're not in pure server mode...
	if ( !sv.IsInPureServerMode() )
		return true;
	
	char warningStr[1024] = {0};

	CRC32_t fileCRC;
	EFileCRCStatus eStatus = g_pFileSystem->CheckCachedFileCRC( msg->m_szPathID, msg->m_szFilename, &fileCRC );
	if ( eStatus == k_eFileCRCStatus_CantOpenFile )
	{
		V_snprintf( warningStr, sizeof( warningStr ), "Pure server: client has loaded extra file [%s]\\%s. File must be removed to play on this server.", msg->m_szPathID, msg->m_szFilename );
	}
	else if ( eStatus == k_eFileCRCStatus_GotCRC && fileCRC != msg->m_CRC )
	{
		V_snprintf( warningStr, sizeof( warningStr ), "Pure server: file [%s]\\%s does not match the server's file.", msg->m_szPathID, msg->m_szFilename );
	}

	if ( warningStr[0] )
	{
		if ( sv_pure_kick_clients.GetInt() )
		{
			Disconnect( "%s", warningStr );
		}
		else
		{
			ClientPrintf( "Warning: %s\n", warningStr );
			if ( sv_pure_trace.GetInt() >= 1 )
			{
				Msg( "[%s] %s\n", GetNetworkIDString(), warningStr );
			}
		}		
	}
	else
	{
		if ( sv_pure_trace.GetInt() >= 2 )
		{
			Msg( "Pure server CRC check: client %s passed check for [%s]\\%s\n", GetClientName(), msg->m_szPathID, msg->m_szFilename );
		}
	}
	
	return true;
}
开发者ID:Axitonium,项目名称:SourceEngine2007,代码行数:44,代码来源:sv_client.cpp

示例12: DefaultMagickFatalError

/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                                                                             %
%                                                                             %
%                                                                             %
+   D e f a u l t F a t a l E r r o r H a n d l e r                           %
%                                                                             %
%                                                                             %
%                                                                             %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%  Method DefaultFatalErrorHandler displays an error reason and then terminates
%  the program.
%
%  The format of the DefaultFatalErrorHandler method is:
%
%      void DefaultMagickFatalError(const ExceptionType severity,
%        const char *reason, const char *description)
%
%  A description of each parameter follows:
%
%    o severity: Specifies the numeric error category.
%
%    o reason: Specifies the reason to display before terminating the
%      program.
%
%    o description: Specifies any description to the reason.
%
%
*/
static void DefaultFatalErrorHandler(const ExceptionType severity,
  const char *reason,const char *description)
{
  if (reason != (char *) NULL)
    {
      (void) fprintf(stderr,"%.1024s: %.1024s",GetClientName(),reason);
      if (description != (char *) NULL)
        (void) fprintf(stderr," (%.1024s)",description);
      if ((severity != OptionError) && errno)
        (void) fprintf(stderr," [%.1024s]",GetErrorMessageString(errno));
      (void) fprintf(stderr,".\n");
    }
  /*
    Release persistent resources
  */
  PanicDestroyMagick();
  /*
    Program quits
  */
  Exit(severity);
}
开发者ID:hank2015,项目名称:testCMS,代码行数:51,代码来源:error.c

示例13: ImportUsage

static void ImportUsage(void)
{
  const char
    **p;

  static const char
    *options[]=
    {
      "-adjoin              join images into a single multi-image file",
      "-annotate geometry text",
      "                     annotate the image with text",
      "-border              include image borders in the output image",
      "-channel type        apply option to select image channels",
      "-colors value        preferred number of colors in the image",
      "-colorspace type     alternate image colorspace",
      "-comment string      annotate image with comment",
      "-compress type       type of pixel compression when writing the image",
      "-crop geometry       preferred size and location of the cropped image",
      "-debug events        display copious debugging information",
      "-define format:option",
      "                     define one or more image format options",
      "-delay value         display the next image after pausing",
      "-density geometry    horizontal and vertical density of the image",
      "-depth value         image depth",
      "-descend             obtain image by descending window hierarchy",
      "-display server      X server to contact",
      "-dispose method      GIF disposal method",
      "-dither              apply Floyd/Steinberg error diffusion to image",
      "-encoding type       text encoding type",
      "-endian type         endianness (MSB or LSB) of the image",
      "-frame               include window manager frame",
      "-geometry geometry   perferred size or location of the image",
      "-gravity direction   which direction to gravitate towards",
      "-help                print program options",
      "-interlace type      None, Line, Plane, or Partition",
      "-label name          assign a label to an image",
      "-limit type value    Area, Disk, Map, or Memory resource limit",
      "-log format          format of debugging information",
      "-monitor             monitor progress",
      "-monochrome          transform image to black and white",
      "-negate              replace every pixel with its complementary color ",
      "-page geometry       size and location of an image canvas",
      "-pause value         seconds delay between snapshots",
      "-pointsize value     font point size",
      "-quality value       JPEG/MIFF/PNG compression level",
      "-quiet               suppress all error or warning messages",
      "-repage geometry     size and location of an image canvas",
      "-resize geometry     resize the image",
      "-rotate degrees      apply Paeth rotation to the image",
      "-sampling-factor geometry",
      "                     horizontal and vertical sampling factor",
      "-scene value         image scene number",
      "-screen              select image from root window",
      "-set attribute value set an image attribute",
      "-silent              operate silently, i.e. don't ring any bells ",
      "-snaps value         number of screen snapshots",
      "-strip               strip image of all profiles and comments",
      "-support factor      resize support: > 1.0 is blurry, < 1.0 is sharp",
      "-thumbnail geometry  create a thumbnail of the image",
      "-transparent color   make this color transparent within the image",
      "-treedepth value     color tree depth",
      "-trim                trim image edges",
      "-type type           image type",
      "-verbose             print detailed information about the image",
      "-version             print version information",
      "-virtual-pixel method",
      "                     Constant, Edge, Mirror, or Tile",
      "-window id           select window with this id or name",
      (char *) NULL
    };

  (void) printf("Version: %s\n",GetMagickVersion((unsigned long *) NULL));
  (void) printf("Copyright: %s\n\n",GetMagickCopyright());
  (void) printf("Usage: %s [options ...] [ file ]\n",
    GetClientName());
  (void) printf("\nWhere options include:\n");
  for (p=options; *p != (char *) NULL; p++)
    (void) printf("  %s\n",*p);
  (void) printf(
  "\nBy default, 'file' is written in the MIFF image format.  To\n");
  (void) printf(
    "specify a particular image format, precede the filename with an image\n");
  (void) printf(
    "format name and a colon (i.e. ps:image) or specify the image type as\n");
  (void) printf(
    "the filename suffix (i.e. image.ps).  Specify 'file' as '-' for\n");
  (void) printf("standard input or output.\n");
  exit(0);
}
开发者ID:miettal,项目名称:armadillo420_standard,代码行数:89,代码来源:import.c

示例14: StreamUsage

static MagickBooleanType StreamUsage(void)
{
  const char
    **p;

  static const char
    *miscellaneous[]=
    {
      "-debug events        display copious debugging information",
      "-help                print program options",
      "-list type           print a list of supported option arguments",
      "-log format          format of debugging information",
      "-version             print version information",
      (char *) NULL
    },
    *settings[]=
    {
      "-authenticate password",
      "                     decipher image with this password",
      "-channel type        apply option to select image channels",
      "-colorspace type     alternate image colorspace",
      "-compress type       type of pixel compression when writing the image",
      "-define format:option",
      "                     define one or more image format options",
      "-density geometry    horizontal and vertical density of the image",
      "-depth value         image depth",
      "-extract geometry    extract area from image",
      "-identify            identify the format and characteristics of the image",
      "-interlace type      type of image interlacing scheme",
      "-interpolate method  pixel color interpolation method",
      "-limit type value    pixel cache resource limit",
      "-map components      one or more pixel components",
      "-monitor             monitor progress",
      "-quantize colorspace reduce colors in this colorspace",
      "-quiet               suppress all warning messages",
      "-regard-warnings     pay attention to warning messages",
      "-respect-parentheses settings remain in effect until parenthesis boundary",
      "-sampling-factor geometry",
      "                     horizontal and vertical sampling factor",
      "-seed value          seed a new sequence of pseudo-random numbers",
      "-set attribute value set an image attribute",
      "-size geometry       width and height of image",
      "-storage-type type   pixel storage type",
      "-synchronize         synchronize image to storage device",
      "-taint               declare the image as modified",
      "-transparent-color color",
      "                     transparent color",
      "-verbose             print detailed information about the image",
      "-virtual-pixel method",
      "                     virtual pixel access method",
      (char *) NULL
    };

  ListMagickVersion(stdout);
  (void) printf("Usage: %s [options ...] input-image raw-image\n",
    GetClientName());
  (void) printf("\nImage Settings:\n");
  for (p=settings; *p != (char *) NULL; p++)
    (void) printf("  %s\n",*p);
  (void) printf("\nMiscellaneous Options:\n");
  for (p=miscellaneous; *p != (char *) NULL; p++)
    (void) printf("  %s\n",*p);
  (void) printf(
    "\nBy default, the image format of 'file' is determined by its magic\n");
  (void) printf(
    "number.  To specify a particular image format, precede the filename\n");
  (void) printf(
    "with an image format name and a colon (i.e. ps:image) or specify the\n");
  (void) printf(
    "image type as the filename suffix (i.e. image.ps).  Specify 'file' as\n");
  (void) printf("'-' for standard input or output.\n");
  return(MagickFalse);
}
开发者ID:0xPr0xy,项目名称:ImageMagick,代码行数:73,代码来源:stream.c

示例15: InitializeMagick

MagickExport void
InitializeMagick(const char *path)
{
  const char
    *p;

  /* NOTE: This routine sets up the path to the client which needs to
     be determined before almost anything else works right. This also
     includes logging!!! So we can't start logging until the path is
     actually saved. As soon as we know what the path is we make the
     same call to DefineClientSettings to set it up. Please make sure
     that this rule is followed in any future updates the this code!!!
  */
  if (MagickInitialized == InitInitialized)
    return;
  SPINLOCK_WAIT;
  MagickInitialized=InitInitialized;
  SPINLOCK_RELEASE;
  
#if defined(MSWINDOWS)
# if defined(_DEBUG) && !defined(__BORLANDC__)
  {
    int
      debug;
    
    debug=_CrtSetDbgFlag(_CRTDBG_REPORT_FLAG);
    debug|=_CRTDBG_CHECK_ALWAYS_DF | _CRTDBG_DELAY_FREE_MEM_DF |
      _CRTDBG_LEAK_CHECK_DF;
    // debug=_CrtSetDbgFlag(debug);
    // _ASSERTE(_CrtCheckMemory());
  }
# endif /* defined(_DEBUG) */
#endif /* defined(MSWINDOWS) */
  
  (void) setlocale(LC_ALL,"");
  (void) setlocale(LC_NUMERIC,"C");

  /* Initialize semaphores */
  InitializeSemaphore();

  /* Initialize logging */
  InitializeLogInfo();

  /* Seed the random number generator */
  srand(MagickRandNewSeed());

  /* Initialize our random number generator */
  InitializeMagickRandomGenerator();

  /*
    Set logging flags using the value of MAGICK_DEBUG if it is set in
    the environment.
  */
  if ((p=getenv("MAGICK_DEBUG")) != (const char *) NULL)
    (void) SetLogEventMask(p);

  (void) LogMagickEvent(ConfigureEvent,GetMagickModule(),
			"Initialize Magick");

  /*
    Set the filesystem block size.
  */
  {
    size_t
      block_size=16384;
    
    if ((p=getenv("MAGICK_IOBUF_SIZE")) != (const char *) NULL)
      block_size = (size_t) MagickAtoL(p);
    
    MagickSetFileSystemBlockSize(block_size);
  }

  /*
    Establish the path, filename, and display name of the client app
  */
  InitializeMagickClientPathAndName(path);
  /*
    If the client name did not get setup for any reason, we take one
    last shot at it using the data the caller passed us.
  */
  if (GetClientName() == (const char *) NULL)
    DefineClientName(path);

  /*
    Adjust minimum coder class if requested.
  */
  if ((p=getenv("MAGICK_CODER_STABILITY")) != (const char *) NULL)
    {
      if (LocaleCompare(p,"UNSTABLE") == 0)
        MinimumCoderClass=UnstableCoderClass;
      else if (LocaleCompare(p,"STABLE") == 0)
        MinimumCoderClass=StableCoderClass;
      else if (LocaleCompare(p,"PRIMARY") == 0)
        MinimumCoderClass=PrimaryCoderClass;
    }

  InitializeMagickSignalHandlers(); /* Signal handlers */
  InitializeTemporaryFiles();       /* Temporary files */
  InitializeMagickResources();      /* Resources */
  InitializeMagickRegistry();       /* Image/blob registry */
//.........这里部分代码省略.........
开发者ID:airhuman,项目名称:cwf,代码行数:101,代码来源:magick.c


注:本文中的GetClientName函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。