diff options
author | Daniel P. Berrange <berrange@redhat.com> | 2012-01-10 15:26:55 +0000 |
---|---|---|
committer | Alon Levy <alevy@redhat.com> | 2012-01-13 18:11:59 +0200 |
commit | 68c2897e5bc910151ab5f6c1c06299ae7e60c678 (patch) | |
tree | 310c8fe12f509c67d350a74b0ecfefc363bb6843 | |
parent | 51f1ad54ad51cdf202566f26e7d29082a3c577ed (diff) | |
download | spice-68c2897e5bc910151ab5f6c1c06299ae7e60c678.tar.gz spice-68c2897e5bc910151ab5f6c1c06299ae7e60c678.tar.xz spice-68c2897e5bc910151ab5f6c1c06299ae7e60c678.zip |
Remove trailing whitespace from end of lines
-rw-r--r-- | TODO.multiclient | 2 | ||||
-rw-r--r-- | client/display_channel.cpp | 2 | ||||
-rw-r--r-- | client/glz_decode_tmpl.c | 2 | ||||
-rw-r--r-- | client/jpeg_decoder.cpp | 2 | ||||
-rw-r--r-- | client/red_client.cpp | 2 | ||||
-rw-r--r-- | client/tests/controller_test/controller_test.cpp | 4 | ||||
-rw-r--r-- | client/windows/platform.cpp | 10 | ||||
-rw-r--r-- | client/windows/stdint.h | 10 | ||||
-rw-r--r-- | client/x11/platform.cpp | 4 | ||||
-rw-r--r-- | client/zlib_decoder.cpp | 4 | ||||
-rw-r--r-- | common/canvas_base.c | 2 | ||||
-rw-r--r-- | common/gdi_canvas.c | 45 | ||||
-rw-r--r-- | common/lz.c | 2 | ||||
-rw-r--r-- | common/lz_compress_tmpl.c | 2 | ||||
-rw-r--r-- | common/lz_decompress_tmpl.c | 2 | ||||
-rw-r--r-- | common/quic.c | 2 | ||||
-rw-r--r-- | common/win/my_getopt-1.5/getopt.h | 4 | ||||
-rw-r--r-- | common/win/my_getopt-1.5/main.c | 6 | ||||
-rw-r--r-- | common/win/my_getopt-1.5/my_getopt.c | 6 | ||||
-rw-r--r-- | common/win/my_getopt-1.5/my_getopt.h | 4 | ||||
-rw-r--r-- | server/glz_encode_tmpl.c | 10 | ||||
-rw-r--r-- | server/jpeg_encoder.c | 30 | ||||
-rw-r--r-- | server/jpeg_encoder.h | 2 | ||||
-rw-r--r-- | server/red_client_shared_cache.h | 2 | ||||
-rw-r--r-- | server/red_worker.c | 2 | ||||
-rw-r--r-- | server/tests/README | 2 |
26 files changed, 82 insertions, 83 deletions
diff --git a/TODO.multiclient b/TODO.multiclient index 5dcdb210..ab37160f 100644 --- a/TODO.multiclient +++ b/TODO.multiclient @@ -10,6 +10,6 @@ SPICE_MSG_MAIN_CHANNEL_NEW single user only, so only one of the clients can use it. Chardev channel: allow adding a chardev channel without any server changes: - qemu -spicevmc name=generic,channelname=bla,id=bla -mon chardev=bla + qemu -spicevmc name=generic,channelname=bla,id=bla -mon chardev=bla Note: client will still need to decide what to do with it of course. So the channelname will have to have a predefined meaning. diff --git a/client/display_channel.cpp b/client/display_channel.cpp index 22391220..173f012e 100644 --- a/client/display_channel.cpp +++ b/client/display_channel.cpp @@ -1306,7 +1306,7 @@ void DisplayChannel::reset_screen() AutoRef<ResetTimer> reset_timer(new ResetTimer(screen()->ref(), get_client())); detach_from_screen(get_client().get_application()); - + get_client().activate_interval_timer(*reset_timer, RESET_TIMEOUT); } diff --git a/client/glz_decode_tmpl.c b/client/glz_decode_tmpl.c index 6aaf63b3..ad78cd71 100644 --- a/client/glz_decode_tmpl.c +++ b/client/glz_decode_tmpl.c @@ -136,7 +136,7 @@ out->b = (out->b << 3) | ((out->b >> 2) & 0x07); \ out->pad = 0; \ out++; \ -} +} #endif #endif diff --git a/client/jpeg_decoder.cpp b/client/jpeg_decoder.cpp index 19d22e34..2b2d5e47 100644 --- a/client/jpeg_decoder.cpp +++ b/client/jpeg_decoder.cpp @@ -85,7 +85,7 @@ JpegDecoder::JpegDecoder() _cinfo.src->skip_input_data = jpeg_decoder_skip_input_data; _cinfo.src->resync_to_restart = jpeg_resync_to_restart; _cinfo.src->term_source = jpeg_decoder_term_source; - + static SpiceJpegDecoderOps decoder_ops = { op_begin_decode, op_decode, diff --git a/client/red_client.cpp b/client/red_client.cpp index 6b11e38a..04544083 100644 --- a/client/red_client.cpp +++ b/client/red_client.cpp @@ -1311,7 +1311,7 @@ void RedClient::dispatch_agent_message(VDAgentMessage* msg, void* data) default: DBG(0, "Unsupported message type %u size %u", msg->type, msg->size); } -} +} void RedClient::handle_agent_tokens(RedPeer::InMessage* message) { diff --git a/client/tests/controller_test/controller_test.cpp b/client/tests/controller_test/controller_test.cpp index 24db9f49..4994613c 100644 --- a/client/tests/controller_test/controller_test.cpp +++ b/client/tests/controller_test/controller_test.cpp @@ -166,7 +166,7 @@ int main(int argc, char *argv[]) //send_data(CONTROLLER_HOST_SUBJECT, (uint8_t*)HOST_SUBJECT, sizeof(HOST_SUBJECT)); send_data(CONTROLLER_SET_TITLE, (uint8_t*)TITLE, sizeof(TITLE)); send_data(CONTROLLER_HOTKEYS, (uint8_t*)HOTKEYS, sizeof(HOTKEYS)); - + send_data(CONTROLLER_CREATE_MENU, (uint8_t*)MENU, sizeof(MENU)); send_value(CONTROLLER_FULL_SCREEN, /*CONTROLLER_SET_FULL_SCREEN |*/ CONTROLLER_AUTO_DISPLAY_RES); @@ -194,7 +194,7 @@ int main(int argc, char *argv[]) printf("Press <Enter> to close connection\n"); getchar(); #ifdef WIN32 - CloseHandle(pipe); + CloseHandle(pipe); #else close(sock); #endif diff --git a/client/windows/platform.cpp b/client/windows/platform.cpp index a99d438d..2b719f21 100644 --- a/client/windows/platform.cpp +++ b/client/windows/platform.cpp @@ -139,7 +139,7 @@ static uint32_t get_clipboard_format(uint32_t type) { for (size_t i = 0; i < clipboard_formats_count; i++) { for (uint32_t* ptype = clipboard_formats[i].types; *ptype; ptype++) { if (*ptype == type) { - return clipboard_formats[i].format; + return clipboard_formats[i].format; } } } @@ -228,7 +228,7 @@ static LRESULT CALLBACK PlatformWinProc(HWND hWnd, UINT message, WPARAM wParam, // handling WM_RENDERFORMAT. Therefore, we try our best by sending CLIPBOARD_REQUEST to the // agent, while waiting alertably for a while (hoping for good) for receiving CLIPBOARD data // or CLIPBOARD_RELEASE from the agent, which both will signal clipboard_event. - uint32_t type = get_clipboard_type(wParam); + uint32_t type = get_clipboard_type(wParam); if (!type) { LOG_INFO("Unsupported clipboard format %u", wParam); break; @@ -985,11 +985,11 @@ void Platform::set_clipboard_listener(ClipboardListener* listener) static HGLOBAL utf8_alloc(LPCSTR data, int size) { - HGLOBAL handle; + HGLOBAL handle; LPVOID buf; int len; - // Received utf8 string is not null-terminated + // Received utf8 string is not null-terminated if (!(len = MultiByteToWideChar(CP_UTF8, 0, data, size, NULL, 0))) { return NULL; } @@ -1001,7 +1001,7 @@ static HGLOBAL utf8_alloc(LPCSTR data, int size) if (!(buf = GlobalLock(handle))) { GlobalFree(handle); return NULL; - } + } // Translate data and set clipboard content if (!(MultiByteToWideChar(CP_UTF8, 0, data, size, (LPWSTR)buf, len))) { GlobalUnlock(handle); diff --git a/client/windows/stdint.h b/client/windows/stdint.h index 0e0ecd41..30131610 100644 --- a/client/windows/stdint.h +++ b/client/windows/stdint.h @@ -104,11 +104,11 @@ typedef unsigned long long uint_least64_t; -/* 7.18.1.3 Fastest minimum-width integer types +/* 7.18.1.3 Fastest minimum-width integer types * Not actually guaranteed to be fastest for all purposes - * Here we use the exact-width types for 8 and 16-bit ints. + * Here we use the exact-width types for 8 and 16-bit ints. */ @@ -164,7 +164,7 @@ typedef unsigned long long uintmax_t; /* 7.18.2.1 Limits of exact-width integer types */ -#define INT8_MIN (-128) +#define INT8_MIN (-128) #define INT16_MIN (-32768) @@ -260,7 +260,7 @@ typedef unsigned long long uintmax_t; /* 7.18.2.4 Limits of integer types capable of holding - object pointers */ + object pointers */ #define INTPTR_MIN INT32_MIN @@ -298,7 +298,7 @@ typedef unsigned long long uintmax_t; -#ifndef WCHAR_MIN /* also in wchar.h */ +#ifndef WCHAR_MIN /* also in wchar.h */ #define WCHAR_MIN 0 diff --git a/client/x11/platform.cpp b/client/x11/platform.cpp index 9094a64a..df8fa768 100644 --- a/client/x11/platform.cpp +++ b/client/x11/platform.cpp @@ -534,7 +534,7 @@ XIC XPlatform::get_input_context() void XPlatform::set_win_proc(Window win, win_proc_t proc) { int res; - + XLockDisplay(x_display); res = XSaveContext(x_display, win, win_proc_context, (XPointer)proc); XUnlockDisplay(x_display); @@ -1046,7 +1046,7 @@ bool DynamicScreen::set_screen_size(int size_index) XLockDisplay(get_display()); config = XRRGetScreenInfo(get_display(), root_window); XUnlockDisplay(get_display()); - + if (!config) { LOG_WARN("get screen info failed"); return false; diff --git a/client/zlib_decoder.cpp b/client/zlib_decoder.cpp index 6c154fef..f5741d3e 100644 --- a/client/zlib_decoder.cpp +++ b/client/zlib_decoder.cpp @@ -36,7 +36,7 @@ static void op_decode(SpiceZlibDecoder *decoder, ZlibDecoder::ZlibDecoder() { int z_ret; - + _z_strm.zalloc = Z_NULL; _z_strm.zfree = Z_NULL; _z_strm.opaque = Z_NULL; @@ -71,7 +71,7 @@ void ZlibDecoder::decode(uint8_t *data, int data_size, uint8_t *dest, int dest_s _z_strm.avail_out = dest_size; z_ret = inflate(&_z_strm, Z_FINISH); - + if (z_ret != Z_STREAM_END) { THROW("zlib inflate failed, error %d", z_ret); } diff --git a/common/canvas_base.c b/common/canvas_base.c index 16688fb3..c4203dd7 100644 --- a/common/canvas_base.c +++ b/common/canvas_base.c @@ -619,7 +619,7 @@ static pixman_image_t *canvas_get_jpeg_alpha(CanvasBase *canvas, decomp_alpha_buf = dest; } lz_decode(lz_data->lz, LZ_IMAGE_TYPE_XXXA, decomp_alpha_buf); - + if (invers) { uint8_t *end = dest + height * stride; for (; dest != end; dest += stride) { diff --git a/common/gdi_canvas.c b/common/gdi_canvas.c index 2cb83d8c..d3e9c7ff 100644 --- a/common/gdi_canvas.c +++ b/common/gdi_canvas.c @@ -641,7 +641,7 @@ static HBRUSH get_brush(GdiCanvas *canvas, SpiceBrush *brush, RecurciveMutex **b CANVAS_ERROR("CreateSolidBrush failed"); } return hbrush; - case SPICE_BRUSH_TYPE_PATTERN: { + case SPICE_BRUSH_TYPE_PATTERN: { GdiCanvas *gdi_surface = NULL; HBRUSH hbrush; pixman_image_t *surface = NULL; @@ -810,11 +810,11 @@ static struct BitmapData get_mask_bitmap(struct GdiCanvas *canvas, struct SpiceQ bitmap.cache = 0; bitmap.from_surface = 1; } else { - + if (!(surface = canvas_get_mask(&canvas->base, mask, NULL))) { return bitmap; } - + pixman_data = (PixmanData *)pixman_image_get_destroy_data (surface); if (pixman_data && (WaitForSingleObject(pixman_data->mutex, INFINITE) != WAIT_FAILED)) { bitmap.dc = create_compatible_dc(); @@ -1060,16 +1060,16 @@ static void gdi_canvas_draw_copy(SpiceCanvas *spice_canvas, SpiceRect *bbox, Spi } else { surface = canvas_get_image(&canvas->base, copy->src_bitmap, FALSE); pixman_data = (PixmanData *)pixman_image_get_destroy_data(surface); - + RecurciveLock lock(*canvas->lock); bitmapmask = get_mask_bitmap(canvas, ©->mask); set_scale_mode(canvas, copy->scale_mode); set_clip(canvas, clip); - + if (pixman_data && (WaitForSingleObject(pixman_data->mutex, INFINITE) != WAIT_FAILED)) { HDC dc; HBITMAP prev_bitmap; - + dc = create_compatible_dc(); prev_bitmap = (HBITMAP)SelectObject(dc, pixman_data->bitmap); gdi_draw_bitmap_redrop(canvas->dc, ©->src_area, bbox, dc, @@ -1083,7 +1083,6 @@ static void gdi_canvas_draw_copy(SpiceCanvas *spice_canvas, SpiceRect *bbox, Spi } pixman_image_unref(surface); - } free_mask(&bitmapmask); } @@ -1149,7 +1148,7 @@ static void gdi_canvas_put_image(SpiceCanvas *spice_canvas, HDC dc, const SpiceR gdi_draw_bitmap_redrop(canvas->dc, &src, dest, dc, NULL, SPICE_ROPD_OP_PUT, 0); } else { - pixman_image_t *image = pixman_image_create_bits(PIXMAN_a8r8g8b8, src_width, src_height, + pixman_image_t *image = pixman_image_create_bits(PIXMAN_a8r8g8b8, src_width, src_height, (uint32_t *)src_data, src_stride); gdi_draw_image(canvas->dc, &src, dest, image, NULL, SPICE_ROPD_OP_PUT, 0); pixman_image_unref(image); @@ -1166,7 +1165,7 @@ static void gdi_draw_bitmap_transparent(GdiCanvas *canvas, HDC dest_dc, const Sp } static void gdi_draw_image_transparent(GdiCanvas *canvas, HDC dest_dc, const SpiceRect *src, - const SpiceRect *dest, pixman_image_t *image, + const SpiceRect *dest, pixman_image_t *image, uint32_t color, int rotate) { HDC dc; @@ -1203,12 +1202,12 @@ static void gdi_canvas_draw_transparent(SpiceCanvas *spice_canvas, SpiceRect *bb if (pixman_data && (WaitForSingleObject(pixman_data->mutex, INFINITE) != WAIT_FAILED)) { HDC dc; HBITMAP prev_bitmap; - + dc = create_compatible_dc(); prev_bitmap = (HBITMAP)SelectObject(dc, pixman_data->bitmap); gdi_draw_bitmap_transparent(canvas, canvas->dc, &transparent->src_area, bbox, dc, transparent->true_color); - + SelectObject(dc, prev_bitmap); DeleteObject(dc); ReleaseMutex(pixman_data->mutex); @@ -1216,7 +1215,7 @@ static void gdi_canvas_draw_transparent(SpiceCanvas *spice_canvas, SpiceRect *bb gdi_draw_image_transparent(canvas, canvas->dc, &transparent->src_area, bbox, surface, transparent->true_color, 0); } - + pixman_image_unref(surface); } } @@ -1278,13 +1277,13 @@ static void gdi_canvas_draw_alpha_blend(SpiceCanvas *spice_canvas, SpiceRect *bb surface = canvas_get_image(&canvas->base, alpha_blend->src_bitmap, TRUE); use_bitmap_alpha = pixman_image_get_depth(surface) == 32; pixman_data = (PixmanData *)pixman_image_get_destroy_data(surface); - + RecurciveLock lock(*canvas->lock); set_clip(canvas, clip); if (pixman_data && (WaitForSingleObject(pixman_data->mutex, INFINITE) != WAIT_FAILED)) { HDC dc; HBITMAP prev_bitmap; - + dc = create_compatible_dc(); prev_bitmap = (HBITMAP)SelectObject(dc, pixman_data->bitmap); gdi_draw_bitmap_alpha(canvas->dc, &alpha_blend->src_area, bbox, dc, alpha_blend->alpha, @@ -1296,7 +1295,7 @@ static void gdi_canvas_draw_alpha_blend(SpiceCanvas *spice_canvas, SpiceRect *bb gdi_draw_image_alpha(canvas->dc, &alpha_blend->src_area, bbox, surface, alpha_blend->alpha, 0, use_bitmap_alpha); } - + pixman_image_unref(surface); } } @@ -1334,18 +1333,18 @@ static void gdi_canvas_draw_opaque(SpiceCanvas *spice_canvas, SpiceRect *bbox, S } else { surface = canvas_get_image(&canvas->base, opaque->src_bitmap, FALSE); pixman_data = (PixmanData *)pixman_image_get_destroy_data(surface); - + RecurciveLock lock(*canvas->lock); bitmapmask = get_mask_bitmap(canvas, &opaque->mask); hbrush = get_brush(canvas, &opaque->brush, &brush_lock); set_scale_mode(canvas, opaque->scale_mode); set_clip(canvas, clip); prev_hbrush = set_brush(canvas->dc, hbrush, &opaque->brush); - + if (pixman_data && (WaitForSingleObject(pixman_data->mutex, INFINITE) != WAIT_FAILED)) { HDC dc; HBITMAP prev_bitmap; - + dc = create_compatible_dc(); prev_bitmap = (HBITMAP)SelectObject(dc, pixman_data->bitmap); if (brush_lock) { @@ -1392,16 +1391,16 @@ static void gdi_canvas_draw_blend(SpiceCanvas *spice_canvas, SpiceRect *bbox, Sp } else { surface = canvas_get_image(&canvas->base, blend->src_bitmap, FALSE); pixman_data = (PixmanData *)pixman_image_get_destroy_data(surface); - + RecurciveLock lock(*canvas->lock); bitmapmask = get_mask_bitmap(canvas, &blend->mask); set_scale_mode(canvas, blend->scale_mode); set_clip(canvas, clip); - + if (pixman_data && (WaitForSingleObject(pixman_data->mutex, INFINITE) != WAIT_FAILED)) { HDC dc; HBITMAP prev_bitmap; - + dc = create_compatible_dc(); prev_bitmap = (HBITMAP)SelectObject(dc, pixman_data->bitmap); gdi_draw_bitmap_redrop(canvas->dc, &blend->src_area, bbox, dc, @@ -1497,11 +1496,11 @@ static void gdi_canvas_draw_rop3(SpiceCanvas *spice_canvas, SpiceRect *bbox, Spi set_scale_mode(canvas, rop3->scale_mode); set_clip(canvas, clip); prev_hbrush = set_brush(canvas->dc, hbrush, &rop3->brush); - + if (pixman_data && (WaitForSingleObject(pixman_data->mutex, INFINITE) != WAIT_FAILED)) { HDC dc; HBITMAP prev_bitmap; - + dc = create_compatible_dc(); prev_bitmap = (HBITMAP)SelectObject(dc, pixman_data->bitmap); if (brush_lock) { diff --git a/common/lz.c b/common/lz.c index 1d695a07..5f517940 100644 --- a/common/lz.c +++ b/common/lz.c @@ -439,7 +439,7 @@ typedef uint16_t rgb16_pixel_t; #define COMP_LEVEL_SIZE_LIMIT 65536 // TODO: implemented lz2. should lz1 be an option (no RLE + distance limitation of MAX_DISTANCE) -// TODO: I think MAX_FARDISTANCE can be changed easily to 2^29 +// TODO: I think MAX_FARDISTANCE can be changed easily to 2^29 // (and maybe even more when pixel > byte). // i.e. we can support 512M Bytes/Pixels distance instead of only ~68K. #define MAX_DISTANCE 8191 // 2^13 diff --git a/common/lz_compress_tmpl.c b/common/lz_compress_tmpl.c index ea878ffd..6db53872 100644 --- a/common/lz_compress_tmpl.c +++ b/common/lz_compress_tmpl.c @@ -296,7 +296,7 @@ match: // RLE or dictionary (both are encoded by distance from ref (-1) a PIXEL x = *ref; while ((ip < ip_bound) && (ref < ref_limit)) { // TODO: maybe separate a run from // the same seg or from different - // ones in order to spare + // ones in order to spare // ref < ref_limit if (!SAME_PIXEL(*ref, x)) { ref++; diff --git a/common/lz_decompress_tmpl.c b/common/lz_decompress_tmpl.c index 46587eef..b0cbb2a9 100644 --- a/common/lz_decompress_tmpl.c +++ b/common/lz_decompress_tmpl.c @@ -170,7 +170,7 @@ out->b = (out->b << 3) | ((out->b >> 2) & 0x07); \ out->pad = 0; \ out++; \ -} +} #endif #endif diff --git a/common/quic.c b/common/quic.c index 46666383..707724a2 100644 --- a/common/quic.c +++ b/common/quic.c @@ -1515,7 +1515,7 @@ static void uncompress_gray(Encoder *encoder, uint8_t *buf, int stride) encoder->width); \ encoder->rows_completed++; \ } - + int quic_decode(QuicContext *quic, QuicImageType type, uint8_t *buf, int stride) { Encoder *encoder = (Encoder *)quic; diff --git a/common/win/my_getopt-1.5/getopt.h b/common/win/my_getopt-1.5/getopt.h index 5f08ccb4..df07082a 100644 --- a/common/win/my_getopt-1.5/getopt.h +++ b/common/win/my_getopt-1.5/getopt.h @@ -9,10 +9,10 @@ * modify, merge, publish, distribute, sublicense, and/or sell copies * of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: - * + * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND diff --git a/common/win/my_getopt-1.5/main.c b/common/win/my_getopt-1.5/main.c index 25674e1c..a9de2723 100644 --- a/common/win/my_getopt-1.5/main.c +++ b/common/win/my_getopt-1.5/main.c @@ -163,7 +163,7 @@ main(int argc, char * argv[]) /* long option list index */ int longind = 0; - /* + /* * print a warning when the POSIXLY_CORRECT environment variable will * interfere with argument placement */ @@ -326,12 +326,12 @@ main(int argc, char * argv[]) if (optind < argc) { int argindex; - + for (argindex = optind; argindex < argc; argindex ++) { char *infilename = argv[argindex]; FILE *infile; - + /* we allow "-" as a synonym for stdin here */ if (! strcmp(infilename, "-")) { diff --git a/common/win/my_getopt-1.5/my_getopt.c b/common/win/my_getopt-1.5/my_getopt.c index e3737df8..5237b8e8 100644 --- a/common/win/my_getopt-1.5/my_getopt.c +++ b/common/win/my_getopt-1.5/my_getopt.c @@ -9,10 +9,10 @@ * modify, merge, publish, distribute, sublicense, and/or sell copies * of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: - * + * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND @@ -198,7 +198,7 @@ int _my_getopt_internal(int argc, char * argv[], const char *shortopts, if(((my_optopt = argv[my_optind][1]) != '-') && ! argv[my_optind][2]) { int c; - + ind = shortoff; while((c = shortopts[ind++])) { if(((shortopts[ind] == ':') || diff --git a/common/win/my_getopt-1.5/my_getopt.h b/common/win/my_getopt-1.5/my_getopt.h index 2c1dd66f..c75101a1 100644 --- a/common/win/my_getopt-1.5/my_getopt.h +++ b/common/win/my_getopt-1.5/my_getopt.h @@ -9,10 +9,10 @@ * modify, merge, publish, distribute, sublicense, and/or sell copies * of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: - * + * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND diff --git a/server/glz_encode_tmpl.c b/server/glz_encode_tmpl.c index 41edb1b7..1402f953 100644 --- a/server/glz_encode_tmpl.c +++ b/server/glz_encode_tmpl.c @@ -144,10 +144,10 @@ /* returns the length of the match. 0 if no match. if image_distance = 0, pixel_distance is the distance between the matching pixels. Otherwise, it is the offset from the beginning of the referred image */ -static INLINE size_t FNAME(do_match)(SharedDictionary *dict, - WindowImageSegment *ref_seg, const PIXEL *ref, +static INLINE size_t FNAME(do_match)(SharedDictionary *dict, + WindowImageSegment *ref_seg, const PIXEL *ref, const PIXEL *ref_limit, - WindowImageSegment *ip_seg, const PIXEL *ip, + WindowImageSegment *ip_seg, const PIXEL *ip, const PIXEL *ip_limit, #ifdef LZ_PLT int pix_per_byte, @@ -546,9 +546,9 @@ static void FNAME(compress)(Encoder *encoder) FNAME(compress_seg)(encoder, seg_id, ip, 2); // compressing the next segments - for (seg_id = dict->window.segs[seg_id].next; + for (seg_id = dict->window.segs[seg_id].next; seg_id != NULL_IMAGE_SEG_ID && ( - dict->window.segs[seg_id].image->id == encoder->cur_image.id); + dict->window.segs[seg_id].image->id == encoder->cur_image.id); seg_id = dict->window.segs[seg_id].next) { FNAME(compress_seg)(encoder, seg_id, (PIXEL *)dict->window.segs[seg_id].lines, 0); } diff --git a/server/jpeg_encoder.c b/server/jpeg_encoder.c index 1c961774..d0e2fc17 100644 --- a/server/jpeg_encoder.c +++ b/server/jpeg_encoder.c @@ -41,13 +41,13 @@ typedef struct JpegEncoder { /* jpeg destination manager callbacks */ -static void dest_mgr_init_destination(j_compress_ptr cinfo) +static void dest_mgr_init_destination(j_compress_ptr cinfo) { JpegEncoder *enc = (JpegEncoder *)cinfo->client_data; if (enc->dest_mgr.free_in_buffer == 0) { - enc->dest_mgr.free_in_buffer = enc->usr->more_space(enc->usr, + enc->dest_mgr.free_in_buffer = enc->usr->more_space(enc->usr, &enc->dest_mgr.next_output_byte); - + if (enc->dest_mgr.free_in_buffer == 0) { red_error("not enough space"); } @@ -59,12 +59,12 @@ static void dest_mgr_init_destination(j_compress_ptr cinfo) static boolean dest_mgr_empty_output_buffer(j_compress_ptr cinfo) { JpegEncoder *enc = (JpegEncoder *)cinfo->client_data; - enc->dest_mgr.free_in_buffer = enc->usr->more_space(enc->usr, + enc->dest_mgr.free_in_buffer = enc->usr->more_space(enc->usr, &enc->dest_mgr.next_output_byte); - + if (enc->dest_mgr.free_in_buffer == 0) { red_error("not enough space"); - } + } enc->cur_image.out_size += enc->dest_mgr.free_in_buffer; return TRUE; } @@ -85,13 +85,13 @@ JpegEncoderContext* jpeg_encoder_create(JpegEncoderUsrContext *usr) enc = spice_new0(JpegEncoder, 1); enc->usr = usr; - + enc->dest_mgr.init_destination = dest_mgr_init_destination; enc->dest_mgr.empty_output_buffer = dest_mgr_empty_output_buffer; enc->dest_mgr.term_destination = dest_mgr_term_destination; enc->cinfo.err = jpeg_std_error(&enc->jerr); - + jpeg_create_compress(&enc->cinfo); enc->cinfo.client_data = enc; enc->cinfo.dest = &enc->dest_mgr; @@ -99,7 +99,7 @@ JpegEncoderContext* jpeg_encoder_create(JpegEncoderUsrContext *usr) } void jpeg_encoder_destroy(JpegEncoderContext* encoder) -{ +{ jpeg_destroy_compress(&((JpegEncoder*)encoder)->cinfo); free(encoder); } @@ -144,8 +144,8 @@ static void convert_BGRX32_to_RGB24(uint8_t *line, int width, uint8_t **out_line uint32_t *src_line = (uint32_t *)line; uint8_t *out_pix; int x; - - ASSERT(out_line && *out_line); + + ASSERT(out_line && *out_line); out_pix = *out_line; @@ -174,7 +174,7 @@ static void convert_RGB24_to_RGB24(uint8_t *line, int width, uint8_t **out_line) } static void do_jpeg_encode(JpegEncoder *jpeg, uint8_t *lines, unsigned int num_lines) -{ +{ uint8_t *lines_end; uint8_t *RGB24_line; int stride, width; @@ -204,7 +204,7 @@ int jpeg_encode(JpegEncoderContext *jpeg, int quality, JpegEncoderImageType type int width, int height, uint8_t *lines, unsigned int num_lines, int stride, uint8_t *io_ptr, unsigned int num_io_bytes) { - JpegEncoder *enc = (JpegEncoder *)jpeg; + JpegEncoder *enc = (JpegEncoder *)jpeg; enc->cur_image.type = type; enc->cur_image.width = width; @@ -243,6 +243,6 @@ int jpeg_encode(JpegEncoderContext *jpeg, int quality, JpegEncoderImageType type do_jpeg_encode(enc, lines, num_lines); - jpeg_finish_compress(&enc->cinfo); - return enc->cur_image.out_size; + jpeg_finish_compress(&enc->cinfo); + return enc->cur_image.out_size; } diff --git a/server/jpeg_encoder.h b/server/jpeg_encoder.h index 74c73243..690a0296 100644 --- a/server/jpeg_encoder.h +++ b/server/jpeg_encoder.h @@ -35,7 +35,7 @@ typedef enum { JPEG_IMAGE_TYPE_INVALID, JPEG_IMAGE_TYPE_RGB16, - /* in byte per color types, the notation is according to the order of the + /* in byte per color types, the notation is according to the order of the colors in the memory */ JPEG_IMAGE_TYPE_RGB24, JPEG_IMAGE_TYPE_BGR24, diff --git a/server/red_client_shared_cache.h b/server/red_client_shared_cache.h index ed3f1dab..fb405c36 100644 --- a/server/red_client_shared_cache.h +++ b/server/red_client_shared_cache.h @@ -75,7 +75,7 @@ static int FUNC_NAME(set_lossy)(CACHE *cache, uint64_t id, int lossy) break; } item = item->next; - } + } pthread_mutex_unlock(&cache->lock); return !!item; } diff --git a/server/red_worker.c b/server/red_worker.c index c8ac8161..983d7676 100644 --- a/server/red_worker.c +++ b/server/red_worker.c @@ -3098,7 +3098,7 @@ static inline int red_current_add_equal(RedWorker *worker, DrawItem *item, TreeI other_drawable->refs++; current_remove_drawable(worker, other_drawable); - /* sending the drawable to clients that already received + /* sending the drawable to clients that already received * (or will receive) other_drawable */ worker_ring_item = ring_get_head(&worker->display_channel->common.base.clients); dpi_ring_item = ring_get_head(&other_drawable->pipes); diff --git a/server/tests/README b/server/tests/README index 8818830f..e44251de 100644 --- a/server/tests/README +++ b/server/tests/README @@ -14,7 +14,7 @@ test_just_sockets_no_ssl A complete server, only provides the main and inputs channels. Doesn't actually produce anything on the channels. Essentially a test of the regular link code (reds.c), good for multiple connect/disconnect tests. test_empty_success - tests calling + tests calling test_fail_on_null_core_interface should abort when run (when spice tries to watch_add) |