diff options
author | Alexander Larsson <alexl@redhat.com> | 2010-05-21 10:51:03 +0200 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2010-05-21 10:51:28 +0200 |
commit | 012bd2577975b902aa5ce0cdd0eb43ef57c948fb (patch) | |
tree | 1dc3de75ad4c173d2de3f60cb0c9d78bf4517542 /common | |
parent | d351bb35ce981d39e839528f4a23bc5b501adab8 (diff) | |
download | spice-012bd2577975b902aa5ce0cdd0eb43ef57c948fb.tar.gz spice-012bd2577975b902aa5ce0cdd0eb43ef57c948fb.tar.xz spice-012bd2577975b902aa5ce0cdd0eb43ef57c948fb.zip |
Fix spelling errors in comments and strings
Diffstat (limited to 'common')
-rw-r--r-- | common/canvas_base.c | 4 | ||||
-rw-r--r-- | common/gl_canvas.c | 2 | ||||
-rw-r--r-- | common/glc.c | 2 | ||||
-rw-r--r-- | common/lz.c | 12 | ||||
-rw-r--r-- | common/lz.h | 6 | ||||
-rw-r--r-- | common/lz_compress_tmpl.c | 10 | ||||
-rw-r--r-- | common/lz_decompress_tmpl.c | 2 | ||||
-rw-r--r-- | common/mem.h | 4 | ||||
-rw-r--r-- | common/quic.c | 2 | ||||
-rw-r--r-- | common/quic.h | 2 |
10 files changed, 23 insertions, 23 deletions
diff --git a/common/canvas_base.c b/common/canvas_base.c index 9fd2ae2e..9d9c9772 100644 --- a/common/canvas_base.c +++ b/common/canvas_base.c @@ -761,7 +761,7 @@ static pixman_image_t *canvas_get_lz(CanvasBase *canvas, LZImage *image, int inv return lz_data->decode_data.out_surface; } -// don't handle plts since bitmaps with plt can be decoded globaly to RGB32 (because +// don't handle plts since bitmaps with plt can be decoded globally to RGB32 (because // same byte sequence can be transformed to different RGB pixels by different plts) static pixman_image_t *canvas_get_glz(CanvasBase *canvas, LZImage *image, int want_original) @@ -1760,7 +1760,7 @@ static void canvas_base_destroy(CanvasBase *canvas) } } -/* This is kind of lame, but it protects against muliple +/* This is kind of lame, but it protects against multiple instances of these functions. We really should stop including canvas_base.c and build it separately instead */ #ifdef CANVAS_SINGLE_INSTANCE diff --git a/common/gl_canvas.c b/common/gl_canvas.c index 82c846ed..ea10c96e 100644 --- a/common/gl_canvas.c +++ b/common/gl_canvas.c @@ -378,7 +378,7 @@ static void gl_canvas_draw_copy(SpiceCanvas *spice_canvas, SpiceRect *bbox, Spic set_mask(canvas, ©->mask, bbox->left, bbox->top); set_op(canvas, copy->rop_decriptor); - //todo: optimize get_imag (use ogl conversion + remove unnecessary copy of 32bpp) + //todo: optimize get_image (use ogl conversion + remove unnecessary copy of 32bpp) surface = canvas_get_image(&canvas->base, copy->src_bitmap, FALSE); surface_to_image(canvas, surface, &image, 0); SET_GLC_RECT(&dest, bbox); diff --git a/common/glc.c b/common/glc.c index 2972b398..e4263cd4 100644 --- a/common/glc.c +++ b/common/glc.c @@ -228,7 +228,7 @@ static void free_tass_vertex_bufs(InternaCtx *ctx) } } -//naiev bezier flattener +//naive bezier flattener static TassVertex *bezier_flattener(InternaCtx *ctx, PathPoint *points) { double ax, bx, cx; diff --git a/common/lz.c b/common/lz.c index f98982a7..73a797c7 100644 --- a/common/lz.c +++ b/common/lz.c @@ -95,7 +95,7 @@ typedef struct Encoder { LzImageSegment *tail_image_segs; LzImageSegment *free_image_segs; - // the dicitionary hash table is composed (1) a pointer to the segment the word was found in + // the dictionary hash table is composed (1) a pointer to the segment the word was found in // (2) a pointer to the first byte in the segment that matches the word HashEntry htab[HASH_SIZE]; @@ -116,7 +116,7 @@ static int lz_read_image_segments(Encoder *encoder, uint8_t *first_lines, unsigned int num_first_lines); -// return a free image segement if one exists. Make allocation if needed. adds it to the +// return a free image segment if one exists. Make allocation if needed. adds it to the // tail of the image segments lists static INLINE LzImageSegment *lz_alloc_image_seg(Encoder *encoder) { @@ -367,7 +367,7 @@ void lz_destroy(LzContext *lz) } if (encoder->head_image_segs) { - encoder->usr->error(encoder->usr, "%s: used_image_segements not empty\n", __FUNCTION__); + encoder->usr->error(encoder->usr, "%s: used_image_segments not empty\n", __FUNCTION__); lz_reset_image_seg(encoder); } lz_dealloc_free_segments(encoder); @@ -517,12 +517,12 @@ int lz_encode(LzContext *lz, LzImageType type, int width, int height, int top_do if (encoder->stride > (width / PLT_PIXELS_PER_BYTE[encoder->type])) { if (((width % PLT_PIXELS_PER_BYTE[encoder->type]) == 0) || ( (encoder->stride - (width / PLT_PIXELS_PER_BYTE[encoder->type])) > 1)) { - encoder->usr->error(encoder->usr, "sride overflows (plt)\n"); + encoder->usr->error(encoder->usr, "stride overflows (plt)\n"); } } } else { if (encoder->stride != width * RGB_BYTES_PER_PIXEL[encoder->type]) { - encoder->usr->error(encoder->usr, "sride != width*bytes_per_pixel (rgb)\n"); + encoder->usr->error(encoder->usr, "stride != width*bytes_per_pixel (rgb)\n"); } } @@ -616,7 +616,7 @@ void lz_decode_begin(LzContext *lz, uint8_t *io_ptr, unsigned int num_io_bytes, *out_type = encoder->type; // TODO: maybe instead of stride we can encode out_n_pixels - // (if stride is not necssary in decoding). + // (if stride is not necessary in decoding). if (IS_IMAGE_TYPE_PLT[encoder->type]) { encoder->palette = palette; *out_n_pixels = encoder->stride * PLT_PIXELS_PER_BYTE[encoder->type] * encoder->height; diff --git a/common/lz.h b/common/lz.h index 1c80df73..6f796f17 100644 --- a/common/lz.h +++ b/common/lz.h @@ -37,7 +37,7 @@ struct LzUsrContext { TODO : determine size limit for the first segment and each chunk. check validity of the segment or go to literal copy. TODO : currently support only rgb images in which width*bytes_per_pixel = stride OR - paletter images in which stride eqauls the min number of bytes to + palette images in which stride equals the min number of bytes to hold a line. stride is not necessary for now. just for sanity check. stride should be > 0 */ @@ -59,9 +59,9 @@ void lz_decode_begin(LzContext *lz, uint8_t *io_ptr, unsigned int num_io_bytes, to_type = the image output type. We assume the buffer is consecutive. i.e. width = stride - Improtant: if the image is plt1/4 and to_type is rgb32, the image + Important: if the image is plt1/4 and to_type is rgb32, the image will decompressed including the last bits in each line. This means buffer should be - larger than width*height if neede and you shoud use stride to fix it. + larger than width*height if needed and you should use stride to fix it. Note: If the image is down to top, set the stride in the sw surface to negative. use alloc_lz_image_surface create the surface. */ diff --git a/common/lz_compress_tmpl.c b/common/lz_compress_tmpl.c index c57cf8dd..18d66976 100644 --- a/common/lz_compress_tmpl.c +++ b/common/lz_compress_tmpl.c @@ -146,8 +146,8 @@ // when encoding, the ref can be in previous segment, and we should check that it doesn't // exceeds its bounds. -// TODO: optimization: when only one chunk exists or when the reference is in the same segement, -// don't make checks if we reach end of segements +// TODO: optimization: when only one chunk exists or when the reference is in the same segment, +// don't make checks if we reach end of segments // TODO: optimize to continue match between segments? // TODO: check hash function // TODO: check times @@ -286,7 +286,7 @@ match: // RLE or dictionary (both are encoded by distance from ref (-1) a distance--; // ip is located now at the position of the second mismatch. - // later it will be substracted by 3 + // later it will be subtracted by 3 if (!distance) { /* zero distance means a run */ @@ -346,7 +346,7 @@ match: // RLE or dictionary (both are encoded by distance from ref (-1) a #endif /* encode the match (like fastlz level 2)*/ if (distance < MAX_DISTANCE) { // MAX_DISTANCE is 2^13 - 1 - // when copy is pefrformed, the byte that holds the copy count is smaller than 32. + // when copy is performed, the byte that holds the copy count is smaller than 32. // When there is a reference, the first byte is always larger then 32 // 3 bits = length, 5 bits = 5 MSB of distance, 8 bits = 8 LSB of distance @@ -355,7 +355,7 @@ match: // RLE or dictionary (both are encoded by distance from ref (-1) a encode(encoder, (uint8_t)(distance & 255)); } else { // more than 3 bits are needed for length // 3 bits 7, 5 bits = 5 MSB of distance, next bytes are 255 till we - // recieve a smaller number, last byte = 8 LSB of distance + // receive a smaller number, last byte = 8 LSB of distance encode(encoder, (uint8_t)((7 << 5) + (distance >> 8))); for (len -= 7; len >= 255; len -= 255) { encode(encoder, 255); diff --git a/common/lz_decompress_tmpl.c b/common/lz_decompress_tmpl.c index deb4665f..aa403f6d 100644 --- a/common/lz_decompress_tmpl.c +++ b/common/lz_decompress_tmpl.c @@ -51,7 +51,7 @@ /* For each output pixel type the following macros are defined: OUT_PIXEL - the output pixel type - COPY_PIXEL(p, out) - assignes the pixel to the place pointed by out and increases + COPY_PIXEL(p, out) - assigns the pixel to the place pointed by out and increases out. Used in RLE. Need special handling because in alpha we copy only the pad byte. COPY_REF_PIXEL(ref, out) - copies the pixel pointed by ref to the pixel pointed by out. diff --git a/common/mem.h b/common/mem.h index 83fbeb32..20877607 100644 --- a/common/mem.h +++ b/common/mem.h @@ -33,7 +33,7 @@ void *spice_malloc_n_m(size_t n_blocks, size_t n_block_bytes, size_t extra_size) void *spice_malloc0_n(size_t n_blocks, size_t n_block_bytes) SPICE_GNUC_MALLOC SPICE_GNUC_ALLOC_SIZE2(1,2); void *spice_realloc_n(void *mem, size_t n_blocks, size_t n_block_bytes) SPICE_GNUC_WARN_UNUSED_RESULT; -/* Optimise: avoid the call to the (slower) _n function if we can +/* Optimize: avoid the call to the (slower) _n function if we can * determine at compile-time that no overflow happens. */ #if defined (__GNUC__) && (__GNUC__ >= 2) && defined (__OPTIMIZE__) @@ -67,7 +67,7 @@ void *spice_realloc_n(void *mem, size_t n_blocks, size_t n_block_bytes) SPICE_GN })) #else -/* Unoptimised version: always call the _n() function. */ +/* Unoptimized version: always call the _n() function. */ #define _SPICE_NEW(struct_type, n_structs, func) \ ((struct_type *) spice_##func##_n ((n_structs), sizeof (struct_type))) diff --git a/common/quic.c b/common/quic.c index 6b2ce01f..e2c211d9 100644 --- a/common/quic.c +++ b/common/quic.c @@ -75,7 +75,7 @@ typedef uint8_t BYTE; typedef struct QuicFamily { unsigned int nGRcodewords[MAXNUMCODES]; /* indexed by code number, contains number of - unmodofied GR codewords in the code */ + unmodified GR codewords in the code */ unsigned int notGRcwlen[MAXNUMCODES]; /* indexed by code number, contains codeword length of the not-GR codeword */ unsigned int notGRprefixmask[MAXNUMCODES]; /* indexed by code number, contains mask to diff --git a/common/quic.h b/common/quic.h index 830a4c94..f4ef8543 100644 --- a/common/quic.h +++ b/common/quic.h @@ -44,7 +44,7 @@ struct QuicUsrContext { void (*free)(QuicUsrContext *usr, void *ptr); int (*more_space)(QuicUsrContext *usr, uint32_t **io_ptr, int rows_completed); int (*more_lines)(QuicUsrContext *usr, uint8_t **lines); // on return the last line of previous - // lines bunch must stil be valid + // lines bunch must still be valid }; int quic_encode(QuicContext *quic, QuicImageType type, int width, int height, |