Switch to ANSI C comments
authorCristy <urban-warrior@imagemagick.org>
Sun, 29 Jul 2018 22:55:33 +0000 (18:55 -0400)
committerCristy <urban-warrior@imagemagick.org>
Sun, 29 Jul 2018 22:55:33 +0000 (18:55 -0400)
MagickCore/accelerate.c
MagickCore/opencl.c
MagickWand/magick-cli.c
MagickWand/operation.c
MagickWand/wandcli.c
coders/dds.c
coders/tiff.c
coders/xcf.c

index 0b5ba7f6214fbfd1efb31bc274eb1009f211b5fc..a8377cb41bae8e44b442c2fc50bf335997d3cf4f 100644 (file)
@@ -1001,11 +1001,11 @@ static MagickBooleanType ComputeContrastStretchImage(Image *image,
   if (image->debug != MagickFalse)
     (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename);
 
-  //exception=(&image->exception);
+  /* exception=(&image->exception); */
 
   /*
-   * initialize opencl env
-   */
+    Initialize opencl environment.
+  */
   device = RequestOpenCLDevice(clEnv);
   queue = AcquireOpenCLCommandQueue(device);
 
@@ -3136,7 +3136,7 @@ static Image *ComputeLocalContrastImage(const Image *image,MagickCLEnv clEnv,
     {
       imageColumns = (unsigned int) image->columns;
       imageRows = (unsigned int) image->rows;
-      iRadius = (cl_int) (image->rows > image->columns ? image->rows : image->columns) * 0.002f * fabs(radius); // Normalized radius, 100% gives blur radius of 20% of the largest dimension
+      iRadius = (cl_int) (image->rows > image->columns ? image->rows : image->columns) * 0.002f * fabs(radius); /* Normalized radius, 100% gives blur radius of 20% of the largest dimension */
 
       passes = (((1.0f * imageRows) * imageColumns * iRadius) + 3999999999) / 4000000000.0f;
       passes = (passes < 1) ? 1: passes;
@@ -3620,9 +3620,11 @@ static Image* ComputeMotionBlurImage(const Image *image,MagickCLEnv clEnv,
     goto cleanup;
   }
 
-  // If the host pointer is aligned to the size of CLPixelPacket,
-  // then use the host buffer directly from the GPU; otherwise,
-  // create a buffer on the GPU and copy the data over
+  /*
+    If the host pointer is aligned to the size of CLPixelPacket, then use
+    the host buffer directly from the GPU; otherwise, create a buffer on
+    the GPU and copy the data over
+  */
   if (ALIGNED(inputPixels,CLPixelPacket))
   {
     mem_flags = CL_MEM_READ_ONLY|CL_MEM_USE_HOST_PTR;
@@ -3631,7 +3633,9 @@ static Image* ComputeMotionBlurImage(const Image *image,MagickCLEnv clEnv,
   {
     mem_flags = CL_MEM_READ_ONLY|CL_MEM_COPY_HOST_PTR;
   }
-  // create a CL buffer from image pixel buffer
+  /*
+    create a CL buffer from image pixel buffer
+  */
   length = image->columns * image->rows;
   imageBuffer = clEnv->library->clCreateBuffer(device->context, mem_flags,
     length * sizeof(CLPixelPacket), (void*)inputPixels, &clStatus);
@@ -3671,7 +3675,9 @@ static Image* ComputeMotionBlurImage(const Image *image,MagickCLEnv clEnv,
     mem_flags = CL_MEM_WRITE_ONLY;
     hostPtr = NULL;
   }
-  // create a CL buffer from image pixel buffer
+  /*
+    Create a CL buffer from image pixel buffer.
+  */
   length = image->columns * image->rows;
   filteredImageBuffer = clEnv->library->clCreateBuffer(device->context, mem_flags,
     length * sizeof(CLPixelPacket), hostPtr, &clStatus);
@@ -3748,7 +3754,9 @@ static Image* ComputeMotionBlurImage(const Image *image,MagickCLEnv clEnv,
   }
 
 
- // get the OpenCL kernel
+  /*
+    Get the OpenCL kernel
+  */
   motionBlurKernel = AcquireOpenCLKernel(device,"MotionBlur");
   if (motionBlurKernel == NULL)
   {
@@ -3757,7 +3765,9 @@ static Image* ComputeMotionBlurImage(const Image *image,MagickCLEnv clEnv,
     goto cleanup;
   }
 
-  // set the kernel arguments
+  /*
+    Set the kernel arguments.
+  */
   i = 0;
   clStatus=clEnv->library->clSetKernelArg(motionBlurKernel,i++,sizeof(cl_mem),
     (void *)&imageBuffer);
@@ -3793,7 +3803,9 @@ static Image* ComputeMotionBlurImage(const Image *image,MagickCLEnv clEnv,
     goto cleanup;
   }
 
-  // launch the kernel
+  /*
+    Launch the kernel.
+  */
   local_work_size[0] = 16;
   local_work_size[1] = 16;
   global_work_size[0] = (size_t)padGlobalWorkgroupSizeToLocalWorkgroupSize(
index d5530e650d19c45ac16b08fdaf7caaacea6b1ad9..8db1aa11826459c43f67260b3469208f6c837f81 100644 (file)
@@ -2723,8 +2723,8 @@ MagickPrivate MagickBooleanType RecordProfileData(MagickCLDevice device,
       name=DestroyString(name);
       return(MagickTrue);
     }
-  start/=1000; // usecs
-  end/=1000;   // usecs
+  start/=1000; /* usecs */
+  end/=1000;   
   elapsed=end-start;
   LockSemaphoreInfo(device->lock);
   i=0;
index 8bd7aa16c101b6293f95f0adea015543c08dc0a1..a6d236fd3b74f9b1a638c30837b124c96ed441e3 100644 (file)
@@ -827,7 +827,7 @@ Magick_Command_Cleanup:
       char
         *text;
   
-      format="%w,%h,%m";   // Get this from image_info Option splaytree
+      format="%w,%h,%m";  /* Get this from image_info Option splaytree */
       text=InterpretImageProperties(image_info,cli_wand->wand.images,format,
         exception);
       if (text == (char *) NULL)
index 6216e68b9fc211950b50725a9a98f1311617462d..365c118df27ab189f3837c4b8f9cdc454a199558 100644 (file)
@@ -5211,7 +5211,9 @@ WandExport void CLIOption(MagickCLI *cli_wand,const char *option,...)
 
     if ( (option_type & SettingOptionFlags) != 0 ) {
       CLISettingOptionInfo(cli_wand, option, arg1, arg2);
-      // FUTURE: Sync Specific Settings into Image Properities (not global)
+      /*
+        FUTURE: Sync Specific Settings into Image Properities (not global)
+      */
     }
 
     /* Operators that do not need images - read, write, stack, clone */
index 4a73394bfdf89aada6824927c84ce81287d40423..75f19212f4678a6d573215c964665304c528bec9 100644 (file)
@@ -241,8 +241,10 @@ WandExport MagickBooleanType CLICatchException(MagickCLI *cli_wand,
   if (cli_wand->wand.debug != MagickFalse)
     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",cli_wand->wand.name);
 
-  // FUTURE: '-regard_warning' should make this more sensitive.
-  // Note pipelined options may like more control over this level
+  /*
+    FUTURE: '-regard_warning' should make this more sensitive.
+    Note pipelined options may like more control over this level
+  */
 
   status=cli_wand->wand.exception->severity > ErrorException ? MagickTrue :
     MagickFalse;
index 6148c6a6a3dbbd5803ce2a12cd8659153348fcbd..d7e55d5d20c6cb3a21853a6888f3f7a4500ccd91 100644 (file)
@@ -2950,7 +2950,7 @@ static void WriteDDSInfo(Image *image, const size_t pixelFormat,
   if (pixelFormat == DDPF_FOURCC)
     {
       (void) WriteBlobLSBLong(image,(unsigned int) compression);
-      for(i=0;i < 5;i++) // bitcount / masks
+      for(i=0;i < 5;i++)  /* bitcount / masks */
         (void) WriteBlobLSBLong(image,0x00);
     }
   else
@@ -2975,7 +2975,7 @@ static void WriteDDSInfo(Image *image, const size_t pixelFormat,
     }
   
   (void) WriteBlobLSBLong(image,caps);
-  for(i=0;i < 4;i++) // ddscaps2 + reserved region
+  for(i=0;i < 4;i++)   /* ddscaps2 + reserved region */
     (void) WriteBlobLSBLong(image,0x00);
 }
 
index d463577fc1f283548dd2cd0425d1d86f61b7b3d1..7098a6da07c3de84d1d5e0b02e2087c636f29541 100644 (file)
@@ -292,7 +292,7 @@ static void InitPSDInfo(const Image *image, PSDInfo *info)
   info->mode=10;
   info->channels=1U;
   if (image->storage_class == PseudoClass)
-    info->mode=2; // indexed mode
+    info->mode=2; /* indexed mode */
   else
     {
       info->channels=(unsigned short) image->number_channels;
index 901caed2cf455b49765a8e64c789594232b1b530..c05ddf28499fb7a719fa3361f7f26f1e6b6f67b5 100644 (file)
@@ -735,8 +735,8 @@ static MagickBooleanType load_hierarchy(Image *image,XCFDocInfo *inDocInfo,
     offset,
     junk;
 
-  (void) ReadBlobMSBLong(image); // width
-  (void) ReadBlobMSBLong(image); // height
+  (void) ReadBlobMSBLong(image); /* width */
+  (void) ReadBlobMSBLong(image); /* height */
   inDocInfo->bytes_per_pixel=ReadBlobMSBLong(image);
 
   /* load in the levels...we make sure that the number of levels