diff --git a/src/calibre/utils/lzx/lzxd.c b/src/calibre/utils/lzx/lzxd.c index b5b9f35af7..b416a9b6ed 100644 --- a/src/calibre/utils/lzx/lzxd.c +++ b/src/calibre/utils/lzx/lzxd.c @@ -179,7 +179,7 @@ static int lzxd_read_input(struct lzxd_stream *lzx) { sym <<= 1; sym |= (bit_buffer & i) ? 1 : 0; \ /* hop to next node index / decoded symbol */ \ sym = lzx->tbl##_table[sym]; \ - /* while we are still in node indicies, not decoded symbols */ \ + /* while we are still in node indices, not decoded symbols */ \ } while (sym >= LZX_##tbl##_MAXSYMBOLS); \ } \ /* result */ \ diff --git a/src/calibre/utils/lzx/mspack.h b/src/calibre/utils/lzx/mspack.h index e9d8a875a0..fb6b795327 100644 --- a/src/calibre/utils/lzx/mspack.h +++ b/src/calibre/utils/lzx/mspack.h @@ -111,8 +111,8 @@ * - #MSPACK_ERR_DATAFORMAT indicates that the file being used or read * is corrupt. * - #MSPACK_ERR_CHECKSUM indicates that a data checksum has failed. - * - #MSPACK_ERR_CRUNCH indicates an error occured during compression. - * - #MSPACK_ERR_DECRUNCH indicates an error occured during decompression. + * - #MSPACK_ERR_CRUNCH indicates an error occurred during compression. + * - #MSPACK_ERR_DECRUNCH indicates an error occurred during decompression. */ #pragma once @@ -883,7 +883,7 @@ struct mscab_decompressor { * and a mscabd_cabinet structure will be returned, with a full list of * folders and files. * - * In the case of an error occuring, NULL is returned and the error code + * In the case of an error occurring, NULL is returned and the error code * is available from last_error(). * * The filename pointer should be considered "in use" until close() is @@ -945,7 +945,7 @@ struct mscab_decompressor { * this method. Any further cabinets found will be chained in a list * using the mscabd_cabinet::next field. * - * In the case of an error occuring anywhere other than the simulated + * In the case of an error occurring anywhere other than the simulated * open(), NULL is returned and the error code is available from * last_error(). * @@ -991,7 +991,7 @@ struct mscab_decompressor { * filename is mscabd_cabinet::nextname * * If the cabinets do not match, an error code will be returned. Neither - * cabinet has been altered, and both should be closed seperately. + * cabinet has been altered, and both should be closed separately. * * Files and folders in a cabinet set are a single entity. All cabinets * in a set use the same file list, which is updated as cabinets in the @@ -1283,7 +1283,7 @@ struct mschm_decompressor { * and a mschmd_header structure will be returned, with a full list of * files. * - * In the case of an error occuring, NULL is returned and the error code + * In the case of an error occurring, NULL is returned and the error code * is available from last_error(). * * The filename pointer should be considered "in use" until close() is @@ -1363,7 +1363,7 @@ struct mschm_decompressor { * files details will be automatically read. The fast_find() method * must be used to obtain file details. * - * In the case of an error occuring, NULL is returned and the error code + * In the case of an error occurring, NULL is returned and the error code * is available from last_error(). * * The filename pointer should be considered "in use" until close() is diff --git a/src/calibre/utils/podofo/doc.cpp b/src/calibre/utils/podofo/doc.cpp index 2799522a65..fea2a21c68 100644 --- a/src/calibre/utils/podofo/doc.cpp +++ b/src/calibre/utils/podofo/doc.cpp @@ -10,7 +10,7 @@ using namespace pdf; -// Constructor/desctructor {{{ +// Constructor/destructor {{{ static void PDFDoc_dealloc(PDFDoc* self) { diff --git a/src/calibre/utils/smartypants.py b/src/calibre/utils/smartypants.py index b652c0100b..1521b5719e 100644 --- a/src/calibre/utils/smartypants.py +++ b/src/calibre/utils/smartypants.py @@ -384,7 +384,7 @@ tags_to_skip_regex = re.compile(r"<(/)?(style|pre|code|kbd|script|math)[^>]*>", self_closing_regex = re.compile(r'/\s*>$') -# interal functions below here +# internal functions below here def parse_attr(attr): do_dashes = do_backticks = do_quotes = do_ellipses = do_stupefy = 0 diff --git a/src/odf/opendocument.py b/src/odf/opendocument.py index 5508d99fdf..6649a4f786 100644 --- a/src/odf/opendocument.py +++ b/src/odf/opendocument.py @@ -215,7 +215,7 @@ class OpenDocument: def __manifestxml(self): """ Generates the manifest.xml file - The self.manifest isn't avaible unless the document is being saved + The self.manifest isn't available unless the document is being saved """ xml=PolyglotBytesIO() xml.write(_XMLPROLOGUE) diff --git a/src/tinycss/color3.py b/src/tinycss/color3.py index 3dd9be8619..7349d76645 100644 --- a/src/tinycss/color3.py +++ b/src/tinycss/color3.py @@ -97,7 +97,7 @@ def parse_color(token): def parse_alpha(args): """ If args is a list of a single INTEGER or NUMBER token, - retur its value clipped to the 0..1 range + return its value clipped to the 0..1 range Otherwise, return None. """ if len(args) == 1 and args[0].type in ('NUMBER', 'INTEGER'): diff --git a/src/tinycss/parsing.py b/src/tinycss/parsing.py index 2f9d9f9f58..7e4c9a0370 100644 --- a/src/tinycss/parsing.py +++ b/src/tinycss/parsing.py @@ -38,7 +38,7 @@ def split_on_comma(tokens): def strip_whitespace(tokens): - """Remove whitespace at the beggining and end of a token list. + """Remove whitespace at the beginning and end of a token list. Whitespace tokens in-between other tokens in the list are preserved. @@ -144,11 +144,11 @@ class ParseError(ValueError): .. attribute:: line - Source line where the error occured. + Source line where the error occurred. .. attribute:: column - Column in the source line where the error occured. + Column in the source line where the error occurred. .. attribute:: reason