From 8b85cadf2d9e9d26ce6e52336177beb8d1472458 Mon Sep 17 00:00:00 2001 From: Daniele Forsi Date: Mon, 24 Mar 2014 20:13:50 +0100 Subject: [PATCH 1/3] Fix spelling errors in comments and strings using codespell See https://github.com/lucasdemarchi/codespell --- README.overview | 2 +- docs/reference/tmpl/itunesdb-lowlevel.sgml | 2 +- src/db-artwork-writer.c | 2 +- src/itdb.h | 4 ++-- src/itdb_device.c | 6 +++--- src/itdb_itunesdb.c | 26 +++++++++++++------------- src/itdb_photoalbum.c | 2 +- src/itdb_sqlite.c | 8 ++++---- src/itdb_tzinfo.c | 2 +- src/ithumb-writer.c | 2 +- 10 files changed, 28 insertions(+), 28 deletions(-) diff --git a/README.overview b/README.overview index a02ad5c..4bc2071 100644 --- a/README.overview +++ b/README.overview @@ -20,7 +20,7 @@ device to get an XML file describing the device capabilities (artwork formats supported, serial number, ...) and dumps this XML file to iPod_Control/Device/SysInfoExtended for future use by libgpod. libgpod doesn't do it directly because sending these SCSI/USB commands might need elevated -priviledges. +privileges. * the application uses libgpod to read the device content diff --git a/docs/reference/tmpl/itunesdb-lowlevel.sgml b/docs/reference/tmpl/itunesdb-lowlevel.sgml index 1c89c91..c16ed7a 100644 --- a/docs/reference/tmpl/itunesdb-lowlevel.sgml +++ b/docs/reference/tmpl/itunesdb-lowlevel.sgml @@ -6,7 +6,7 @@ Low-level functions which shouldn't be needed in normal situations -These functions are not normally needed but are avalable to allow for finer +These functions are not normally needed but are available to allow for finer control over the iPod database. diff --git a/src/db-artwork-writer.c b/src/db-artwork-writer.c index 824b502..5d6de0d 100644 --- a/src/db-artwork-writer.c +++ b/src/db-artwork-writer.c @@ -1094,7 +1094,7 @@ ipod_artwork_mark_new_doubles (Itdb_iTunesDB *itdb, guint max_id) artwork->dbid = 0; } else - { /* first occurence of this artwork */ + { /* first occurrence of this artwork */ artwork->id = ++max_id; artwork->dbid = track->dbid; g_hash_table_insert (hash, g_strdup (checkstring), artwork); diff --git a/src/itdb.h b/src/itdb.h index 858cae7..72299ac 100644 --- a/src/itdb.h +++ b/src/itdb.h @@ -265,7 +265,7 @@ typedef enum { /** * Itdb_IpodInfo: * @model_number: The model number. This is abbreviated. If the first - * character is not numeric, it is ommited. e.g. + * character is not numeric, it is omitted. e.g. * "MA350 -> A350", "M9829 -> 9829" * @capacity: The iPod's capacity in gigabytes * @ipod_model: The iPod model @@ -1747,7 +1747,7 @@ struct _Itdb_Track /** * ItdbFileError: - * @ITDB_FILE_ERROR_SEEK: file corrupt: illegal seek occured + * @ITDB_FILE_ERROR_SEEK: file corrupt: illegal seek occurred * @ITDB_FILE_ERROR_CORRUPT: file corrupt * @ITDB_FILE_ERROR_NOTFOUND: file not found * @ITDB_FILE_ERROR_RENAME: file could not be renamed diff --git a/src/itdb_device.c b/src/itdb_device.c index 6f1bc0b..e12f488 100644 --- a/src/itdb_device.c +++ b/src/itdb_device.c @@ -1527,9 +1527,9 @@ itdb_device_musicdirs_number (Itdb_Device *device) * @path: the file to look at. * @hdr: the header string (4 bytes) in case of LITTLE_ENDIAN * - * Check if endianess can be determined by looking at header of @path. + * Check if endianness can be determined by looking at header of @path. * - * Returns: G_LITTLE_ENDIAN, G_BIG_ENDIAN or 0 if endianess could not be + * Returns: G_LITTLE_ENDIAN, G_BIG_ENDIAN or 0 if endianness could not be * determined. */ static guint endianess_check_path (const gchar *path, const gchar *hdr) @@ -1565,7 +1565,7 @@ static guint endianess_check_path (const gchar *path, const gchar *hdr) return byte_order; } -/* Attempt to guess the endianess used by this iPod. +/* Attempt to guess the endianness used by this iPod. * * It will overwrite the previous setting. * diff --git a/src/itdb_itunesdb.c b/src/itdb_itunesdb.c index a177e26..4cc771a 100644 --- a/src/itdb_itunesdb.c +++ b/src/itdb_itunesdb.c @@ -1560,7 +1560,7 @@ static char *extract_mhod_string (FContents *cts, glong seek) Itdb_SPLPREF OR Itdb_SPLRULES. *mhod_len is set to the total length of the mhod (-1 in case an - *error occured). + *error occurred). MHODData.valid is set to FALSE in case of any error. cts->error will be set accordingly. @@ -1974,13 +1974,13 @@ static void set_error_a_header_smaller_than_b (GError **error, } -/* finds next occurence of section @a in section b (@b_seek) starting +/* finds next occurrence of section @a in section b (@b_seek) starting at @start_seek */ /* Return value: -1 and cts->error not set: section @a could not be found - -1 and cts->error set: some error occured - >=0: start of next occurence of section @a + -1 and cts->error set: some error occurred + >=0: start of next occurrence of section @a */ static glong find_next_a_in_b (FContents *cts, const gchar *a, @@ -2767,7 +2767,7 @@ static glong get_mhit (FImport *fimp, glong mhit_seek) * adding a new playlist (named @plname) with the tracks specified in * @cts. If @plname is NULL, a standard name will be substituted */ /* Returns FALSE on error, TRUE on success. On error @fimp->error will - * be set apropriately. */ + * be set appropriately. */ static gboolean process_OTG_file (FImport *fimp, FContents *cts, const gchar *plname) { @@ -2911,7 +2911,7 @@ static gboolean read_OTG_playlists (FImport *fimp) (this is treated as a programming error) */ /* Return value: TRUE: import successful - FALSE: error occured, fimp->error is set */ + FALSE: error occurred, fimp->error is set */ static gboolean parse_tracks (FImport *fimp, glong mhsd_seek) { FContents *cts; @@ -2976,7 +2976,7 @@ static gboolean parse_tracks (FImport *fimp, glong mhsd_seek) mhsd (this is treated as a programming error) */ /* Return value: TRUE: import successful - FALSE: error occured, fimp->error is set */ + FALSE: error occurred, fimp->error is set */ static gboolean parse_playlists (FImport *fimp, glong mhsd_seek) { FContents *cts; @@ -3443,7 +3443,7 @@ Itdb_iTunesDB *itdb_parse_file (const gchar *filename, GError **error) /* ---------------------------------------------------------------------- */ /* from here on we have the functions for writing the iTunesDB */ -/* will expand @cts when necessary in order to accomodate @len bytes +/* will expand @cts when necessary in order to accommodate @len bytes starting at @seek */ static void wcontents_maybe_expand (WContents *cts, gulong len, gulong seek) @@ -3500,7 +3500,7 @@ static void put_string (WContents *cts, gchar *string) } /* Write 4-byte long @header identifcation taking into account - * possible reversed endianess */ + * possible reversed endianness */ static void put_header (WContents *cts, gchar *header) { gchar rdata[4]; @@ -3874,7 +3874,7 @@ static void mk_mhbd (FExport *fexp, guint32 children) /* 0x22 */ put16lint (cts, fexp->itdb->priv->unk_0x22); /* unknown */ - put64lint (cts, fexp->itdb->priv->id_0x24); /* unkown id */ + put64lint (cts, fexp->itdb->priv->id_0x24); /* unknown id */ put32lint (cts, 0); /* unknown */ /* 0x30 */ put16lint (cts, 0); /* set hashing scheme to 0 for now, will be set @@ -5993,7 +5993,7 @@ static gboolean itdb_write_file_internal (Itdb_iTunesDB *itdb, if (!filename) filename = itdb->filename; - /* set endianess flag */ + /* set endianness flag */ if (!itdb->device->byte_order) itdb_device_autodetect_endianess (itdb->device); @@ -6896,7 +6896,7 @@ gboolean itdb_shuffle_write_file (Itdb_iTunesDB *itdb, g_return_val_if_fail (filename, FALSE); g_return_val_if_fail (itdb->device, FALSE); - /* Set endianess flag just in case */ + /* Set endianness flag just in case */ if (!itdb->device->byte_order) itdb_device_autodetect_endianess (itdb->device); @@ -7065,7 +7065,7 @@ gboolean itdb_rename_files (const gchar *mp, GError **error) if (plcname_o) { if (rename (plcname_o, plcname_n) == -1) - { /* an error occured */ + { /* an error occurred */ g_set_error (error, G_FILE_ERROR, g_file_error_from_errno (errno), diff --git a/src/itdb_photoalbum.c b/src/itdb_photoalbum.c index a2c8c29..403848a 100644 --- a/src/itdb_photoalbum.c +++ b/src/itdb_photoalbum.c @@ -206,7 +206,7 @@ gchar *itdb_get_photos_thumb_dir (const gchar *mountpoint) /** * itdb_photodb_parse: * @mp: mountpoint of the iPod - * @error: will contain the error description when an error occured. + * @error: will contain the error description when an error occurred. * * Parses the photo database of an iPod mounted at @mp. * diff --git a/src/itdb_sqlite.c b/src/itdb_sqlite.c index b5b2975..21d8eed 100644 --- a/src/itdb_sqlite.c +++ b/src/itdb_sqlite.c @@ -839,7 +839,7 @@ static int mk_Library(Itdb_iTunesDB *itdb, /* name order */ sqlite3_bind_int(stmt_container, ++idx, pos++); /* parent_pid */ - /* TODO: unkown meaning, always 0? */ + /* TODO: unknown meaning, always 0? */ sqlite3_bind_int(stmt_container, ++idx, 0); /* media_kinds */ sqlite3_bind_int(stmt_container, ++idx, types); @@ -900,10 +900,10 @@ static int mk_Library(Itdb_iTunesDB *itdb, sqlite3_bind_null(stmt_db_info, ++idx); } /* bib */ - /* TODO: unkown meaning, set to NULL */ + /* TODO: unknown meaning, set to NULL */ sqlite3_bind_null(stmt_db_info, ++idx); /* rib */ - /* TODO: unkown meaning, set to NULL */ + /* TODO: unknown meaning, set to NULL */ sqlite3_bind_null(stmt_db_info, ++idx); res = sqlite3_step(stmt_db_info); @@ -1958,7 +1958,7 @@ static void run_post_process_commands(Itdb_iTunesDB *itdb, const char *outpath, g_hash_table_destroy(sqlcmd_map); printf("[%s] %d out of %d post process commands successfully executed\n", __func__, ok_cnt, cnt); - /* TODO perhaps we want to roll back when an error has occured ? */ + /* TODO perhaps we want to roll back when an error has occurred ? */ sqlite3_exec(db, "COMMIT;", NULL, NULL, NULL); } else { printf("[%s]: Error: could not create hash table!\n", __func__); diff --git a/src/itdb_tzinfo.c b/src/itdb_tzinfo.c index 3c29947..ce8216d 100644 --- a/src/itdb_tzinfo.c +++ b/src/itdb_tzinfo.c @@ -160,7 +160,7 @@ static gboolean raw_timezone_to_utc_shift_5g (gint16 raw_timezone, * going from Tokyo to LA and then to Europe). * The calculation below shifts the origin so that 0 corresponds * to UTC-12 and the max is 24*60 and corresponds to UTC+12 - * Finally, we substract 12*60 to that value to get a signed number + * Finally, we subtract 12*60 to that value to get a signed number * giving the timezone relative to UTC. */ *utc_shift = raw_timezone*60 - TZ_SHIFT*3600; diff --git a/src/ithumb-writer.c b/src/ithumb-writer.c index 6b47aa6..b33cc5c 100644 --- a/src/ithumb-writer.c +++ b/src/ithumb-writer.c @@ -1215,7 +1215,7 @@ static gboolean ithumb_rearrange_thumbnail_file (gpointer _key, /* printf ("%s: %d\n", filename, g_list_length (thumbs)); */ - /* check if an error occured */ + /* check if an error occurred */ if (*result == FALSE) goto out; -- 2.1.4