]> granicus.if.org Git - imagemagick/blobdiff - MagickWand/script-token.c
(no commit message)
[imagemagick] / MagickWand / script-token.c
index 96cb95eb8682bf2bf4fad44252cfa783dfd434a7..53bb2d1130becc567d940db740099196ec793d54 100644 (file)
@@ -15,7 +15,7 @@
 %                               January 2012                                  %
 %                                                                             %
 %                                                                             %
-%  Copyright 1999-2012 ImageMagick Studio LLC, a non-profit organization      %
+%  Copyright 1999-2014 ImageMagick Studio LLC, a non-profit organization      %
 %  dedicated to making software imaging solutions freely available.           %
 %                                                                             %
 %  You may not use this file except in compliance with the License.  You may  %
 %  DOS script launcher...
 %
 %  Similarly any '@' at the start of the line (outside of quotes) will also be
-%  treated as comment. This allow you to create a DOS script launcher, to turn
-%  ".bat" DOS scripts into "magick" scripts.
+%  treated as comment. This allow you to create a DOS script launcher, to
+%  allow a ".bat" DOS scripts to run as "magick" scripts instead.
 %
 %    @echo This line is DOS executed but ignored by Magick
 %    @magick -script %~dpnx0 %*
 %    o filename   the filename to open  ("-" means stdin)
 %
 */
-WandExport ScriptTokenInfo *AcquireScriptTokenInfo(char *filename)
+WandExport ScriptTokenInfo *AcquireScriptTokenInfo(const char *filename)
 {
   ScriptTokenInfo
     *token_info;
@@ -373,7 +373,9 @@ WandExport MagickBooleanType GetScriptToken(ScriptTokenInfo *token_info)
   state=IN_WHITE;
   quote='\0';
   offset=0;
+DisableMSCWarning(4127)
   while(1)
+RestoreMSCWarning
   {
     /* get character */
     GetChar(c);
@@ -389,7 +391,7 @@ WandExport MagickBooleanType GetScriptToken(ScriptTokenInfo *token_info)
       if ( ( c == '#' ) ||
            ( token_info->curr_column==1 && (c == ':' || c == '@' ) ) )
         state=IN_COMMENT;
-    /* whitespace token seperator character */
+    /* whitespace token separator character */
     if (strchr(" \n\r\t",c) != (char *)NULL) {
       switch (state) {
         case IN_TOKEN: