Commit 3cbef1a9 authored by Raphael Kubo da Costa's avatar Raphael Kubo da Costa Committed by Christian Beier

Use C-style comments in rfbconfig.h.cmake and C source code.

Using C++-style comments when building the code with -ansi does not
work, so be more conservative with the comment style.
parent 88e60435
......@@ -502,9 +502,11 @@ DLLEXPORT unsigned long DLLCALL tjBufSize(int width, int height,
if(width<1 || height<1 || jpegSubsamp<0 || jpegSubsamp>=NUMSUBOPT)
_throw("tjBufSize(): Invalid argument");
// This allows for rare corner cases in which a JPEG image can actually be
// larger than the uncompressed input (we wouldn't mention it if it hadn't
// happened before.)
/*
* This allows for rare corner cases in which a JPEG image can actually be
* larger than the uncompressed input (we wouldn't mention it if it hadn't
* happened before.)
*/
mcuw=tjMCUWidth[jpegSubsamp];
mcuh=tjMCUHeight[jpegSubsamp];
chromasf=jpegSubsamp==TJSAMP_GRAY? 0: 4*64/(mcuw*mcuh);
......@@ -521,9 +523,11 @@ DLLEXPORT unsigned long DLLCALL TJBUFSIZE(int width, int height)
if(width<1 || height<1)
_throw("TJBUFSIZE(): Invalid argument");
// This allows for rare corner cases in which a JPEG image can actually be
// larger than the uncompressed input (we wouldn't mention it if it hadn't
// happened before.)
/*
* This allows for rare corner cases in which a JPEG image can actually be
* larger than the uncompressed input (we wouldn't mention it if it hadn't
* happened before.)
*/
retval=PAD(width, 16) * PAD(height, 16) * 6 + 2048;
bailout:
......
......@@ -81,10 +81,10 @@ typedef struct TIGHT_CONF_s {
} TIGHT_CONF;
static TIGHT_CONF tightConf[4] = {
{ 65536, 2048, 6, 0, 0, 0, 4, 24 }, // 0 (used only without JPEG)
{ 65536, 2048, 32, 1, 1, 1, 96, 24 }, // 1
{ 65536, 2048, 32, 3, 3, 2, 96, 96 }, // 2 (used only with JPEG)
{ 65536, 2048, 32, 7, 7, 5, 96, 256 } // 9
{ 65536, 2048, 6, 0, 0, 0, 4, 24 }, /* 0 (used only without JPEG) */
{ 65536, 2048, 32, 1, 1, 1, 96, 24 }, /* 1 */
{ 65536, 2048, 32, 3, 3, 2, 96, 96 }, /* 2 (used only with JPEG) */
{ 65536, 2048, 32, 7, 7, 5, 96, 256 } /* 9 */
};
#ifdef LIBVNCSERVER_HAVE_LIBPNG
......
......@@ -625,7 +625,7 @@ webSocketsDecodeHybi(rfbClientPtr cl, char *dst, int len)
int flength, fhlen;
/* int fin; */ /* not used atm */
// rfbLog(" <== %s[%d]: %d cl: %p, wsctx: %p-%p (%d)\n", __func__, gettid(), len, cl, wsctx, (char *)wsctx + sizeof(ws_ctx_t), sizeof(ws_ctx_t));
/* rfbLog(" <== %s[%d]: %d cl: %p, wsctx: %p-%p (%d)\n", __func__, gettid(), len, cl, wsctx, (char *)wsctx + sizeof(ws_ctx_t), sizeof(ws_ctx_t)); */
if (wsctx->readbuflen) {
/* simply return what we have */
......
......@@ -686,7 +686,7 @@ typedef struct _rfbClientRec {
#ifdef LIBVNCSERVER_HAVE_LIBJPEG
/* TurboVNC Encoding support (extends TightVNC) */
int turboSubsampLevel;
int turboQualityLevel; // 1-100 scale
int turboQualityLevel; /* 1-100 scale */
#endif
#endif
......
......@@ -75,13 +75,13 @@
#cmakedefine LIBVNCSERVER_WORDS_BIGENDIAN 1
/* Define to empty if `const' does not conform to ANSI C. */
//#cmakedefine const @CMAKE_CONST@
/* #cmakedefine const @CMAKE_CONST@ */
/* Define to `__inline__' or `__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
//#ifndef __cplusplus
//#cmakedefine inline @CMAKE_INLINE@
//#endif
/* #ifndef __cplusplus */
/* #cmakedefine inline @CMAKE_INLINE@ */
/* #endif */
/* Define to `int' if <sys/types.h> does not define. */
#cmakedefine HAVE_LIBVNCSERVER_PID_T 1
......
......@@ -13,8 +13,8 @@
* wxWindows Library License for more details.
*/
// This provides rudimentary facilities for loading and saving true color
// BMP and PPM files
/* This provides rudimentary facilities for loading and saving true color */
/* BMP and PPM files */
#ifndef __BMP_H__
#define __BMP_H__
......@@ -26,16 +26,20 @@ enum BMPPIXELFORMAT {BMP_RGB=0, BMP_RGBX, BMP_BGR, BMP_BGRX, BMP_XBGR, BMP_XRGB}
extern "C" {
#endif
// This will load a Windows bitmap from a file and return a buffer with the
// specified pixel format, scanline alignment, and orientation. The width and
// height are returned in w and h.
/*
* This will load a Windows bitmap from a file and return a buffer with the
* specified pixel format, scanline alignment, and orientation. The width and
* height are returned in w and h.
*/
int loadbmp(char *filename, unsigned char **buf, int *w, int *h,
enum BMPPIXELFORMAT f, int align, int dstbottomup);
// This will save a buffer with the specified pixel format, pitch, orientation,
// width, and height as a 24-bit Windows bitmap or PPM (the filename determines
// which format to use)
/*
* This will save a buffer with the specified pixel format, pitch, orientation,
* width, and height as a 24-bit Windows bitmap or PPM (the filename determines
* which format to use)
*/
int savebmp(char *filename, unsigned char *buf, int w, int h,
enum BMPPIXELFORMAT f, int srcpitch, int srcbottomup);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment