diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/bookmark.c | 4 | ||||
-rw-r--r-- | src/command.c | 4 | ||||
-rw-r--r-- | src/config.def.h | 2 | ||||
-rw-r--r-- | src/ex.c | 16 | ||||
-rw-r--r-- | src/hints.c | 8 | ||||
-rw-r--r-- | src/history.c | 4 | ||||
-rw-r--r-- | src/input.c | 2 | ||||
-rw-r--r-- | src/js.c | 4 | ||||
-rw-r--r-- | src/main.c | 16 | ||||
-rw-r--r-- | src/map.c | 4 | ||||
-rw-r--r-- | src/normal.c | 2 | ||||
-rw-r--r-- | src/pass.c | 2 | ||||
-rw-r--r-- | src/setting.c | 10 | ||||
-rw-r--r-- | src/shortcut.c | 8 | ||||
-rw-r--r-- | src/util.c | 12 |
15 files changed, 49 insertions, 49 deletions
diff --git a/src/bookmark.c b/src/bookmark.c index 276fb5c..e0376be 100644 --- a/src/bookmark.c +++ b/src/bookmark.c @@ -212,7 +212,7 @@ gboolean bookmark_queue_unshift(const char *uri) * Retrieves the oldest entry from queue. * * @item_count: will be filled with the number of remaining items in queue. - * Retruned uri must be freed with g_free. + * Returned uri must be freed with g_free. */ char *bookmark_queue_pop(int *item_count) { @@ -293,7 +293,7 @@ static gboolean bookmark_contains_all_tags(Bookmark *bm, char **query, found = false; /* we want to do a prefix match on all bookmark tags - so we check for - * a match on string beginn - if this fails we move the cursor to the + * a match on string begin - if this fails we move the cursor to the * next space and do the test again */ while (cursor && *cursor) { /* match was not found at current cursor position */ diff --git a/src/command.c b/src/command.c index 4134ccb..ed278b3 100644 --- a/src/command.c +++ b/src/command.c @@ -46,7 +46,7 @@ gboolean command_search(const Arg *arg) /* copy search query for later use */ if (arg->s) { - /* set dearch dir only when the searching is started */ + /* set search direction only when the searching is started */ dir = arg->i > 0 ? 1 : -1; query = arg->s; /* add new search query to history and search register */ @@ -72,7 +72,7 @@ gboolean command_search(const Arg *arg) newsearch = false; /* skip first search because this is done during typing in ex - * mode, else the search wil mark the next match as active */ + * mode, else the search will mark the next match as active */ if (count) { count -= 1; } diff --git a/src/config.def.h b/src/config.def.h index b3849b1..af20027 100644 --- a/src/config.def.h +++ b/src/config.def.h @@ -24,7 +24,7 @@ /* features */ /* enable cookie support */ #define FEATURE_COOKIE -/* highlich search reasults */ +/* highlight search results */ #define FEATURE_SEARCH_HIGHLIGHT /* disable scrollbars */ #define FEATURE_NO_SCROLLBARS @@ -94,7 +94,7 @@ typedef struct { typedef gboolean (*ExFunc)(const ExArg *arg); typedef struct { - const char *name; /* full name of the command even if called abreviated */ + const char *name; /* full name of the command even if called abbreviated */ ExCode code; /* constant id for the command */ ExFunc func; #define EX_FLAG_NONE 0x000 /* no flags set */ @@ -145,7 +145,7 @@ static void history_rewind(void); /* The order of following command names is significant. If there exists * ambiguous commands matching to the users input, the first defined will be - * the prefered match. + * the preferred match. * Also the sorting and grouping of command names matters, so we give up * searching for a matching command if the next compared character did not * match. */ @@ -234,7 +234,7 @@ VbResult ex_keypress(int key) return RESULT_COMPLETE; } - /* process the custbuffer */ + /* process the cutbuffer */ if (info.phase == PHASE_CUTBUF) { info.cutbuf = (char)key; info.phase = PHASE_CUTBUF; @@ -312,7 +312,7 @@ VbResult ex_keypress(int key) break; case CTRL('U'): - /* remove everythings between cursor and prompt */ + /* remove everything between cursor and prompt */ mark = gtk_text_buffer_get_insert(buffer); gtk_text_buffer_get_iter_at_mark(buffer, &end, mark); gtk_text_buffer_get_iter_at_offset(buffer, &start, strlen(vb.state.prompt)); @@ -370,7 +370,7 @@ void ex_input_changed(const char *text) /* don't add line breaks if content is pasted from clipboard into inputbox */ if (gtk_text_buffer_get_line_count(buffer) > 1) { - /* remove everething from the buffer, except of the first line */ + /* remove everything from the buffer, except of the first line */ gtk_text_buffer_get_iter_at_line(buffer, &start, 0); if (gtk_text_iter_forward_to_line_end(&start)) { gtk_text_buffer_get_end_iter(buffer, &end); @@ -559,7 +559,7 @@ static gboolean parse_command_name(const char **input, ExArg *arg) if (commands[i].name[len - 1] == **input) { /* partial match found */ if (!matches) { - /* if this is the first then remeber it */ + /* if this is the first then remember it */ first = i; } matches++; @@ -1017,7 +1017,7 @@ static gboolean complete(short direction) /* save the string prefix that will not be part of completion like * the ':open ' if ':open something' is completed. this means that - * the complation will only the none prefix part of the input */ + * the completion will only the none prefix part of the input */ OVERWRITE_NSTRING(excomp.prefix, input, token - input + 1); /* the token points to a space, skip this */ @@ -1094,7 +1094,7 @@ static gboolean complete(short direction) /** * Callback called from the completion if a item is selected to write the - * matche item accordings with previously saved prefix and command name to the + * matched item according with previously saved prefix and command name to the * inputbox. */ static void completion_select(char *match) diff --git a/src/hints.c b/src/hints.c index 2943def..2b8e15c 100644 --- a/src/hints.c +++ b/src/hints.c @@ -36,8 +36,8 @@ static struct { JSObjectRef obj; /* the js object */ char mode; /* mode identifying char - that last char of the hint prompt */ - int promptlen; /* lenfth of the hint prompt chars 2 or 3 */ - gboolean gmode; /* indicate if the hints g mode is used */ + int promptlen; /* length of the hint prompt chars 2 or 3 */ + gboolean gmode; /* indicate if the hints 'g' mode is used */ JSContextRef ctx; #if WEBKIT_CHECK_VERSION(2, 0, 0) /* holds the setting if JavaScript can open windows automatically that we @@ -132,7 +132,7 @@ void hints_clear(void) void hints_create(const char *input) { /* don't start hinting if the hinting object isn't created - for example - * if hinting is started before the first data of page are recieved */ + * if hinting is started before the first data of page are received */ if (!hints.obj) { return; } @@ -171,7 +171,7 @@ void hints_create(const char *input) }; call_hints_function("init", 3, arguments); - /* if hinting is started there won't be any aditional filter given and + /* if hinting is started there won't be any additional filter given and * we can go out of this function */ return; } diff --git a/src/history.c b/src/history.c index 4e3d186..9883d8d 100644 --- a/src/history.c +++ b/src/history.c @@ -191,7 +191,7 @@ GList *history_get_list(VbInputType type, const char *query) g_list_free_full(src, (GDestroyNotify)free_history); /* prepend the original query as own item like done in vim to have the - * origianl input string in input box if we step before the first real + * original input string in input box if we step before the first real * item */ result = g_list_prepend(result, g_strdup(query)); @@ -204,7 +204,7 @@ static const char *get_file_by_type(HistoryType type) } /** - * Loads history items form file but eleminate duplicates in FIFO order. + * Loads history items form file but eliminate duplicates in FIFO order. * * Returned list must be freed with (GDestroyNotify) free_history. */ diff --git a/src/input.c b/src/input.c index 9827da8..b34b423 100644 --- a/src/input.c +++ b/src/input.c @@ -40,7 +40,7 @@ extern VbCore vb; */ void input_enter(void) { - /* switch focus first to make shure we can write to the inputbox without + /* switch focus first to make sure we can write to the inputbox without * disturbing the user */ gtk_widget_grab_focus(GTK_WIDGET(vb.gui.webview)); vb_echo(VB_MSG_NORMAL, false, "-- INPUT --"); @@ -66,7 +66,7 @@ gboolean js_eval(JSContextRef ctx, const char *script, const char *file, } /** - * Creates a JavaScript object in contect of given frame. + * Creates a JavaScript object in context of given frame. */ JSObjectRef js_create_object(JSContextRef ctx, const char *script) { @@ -118,7 +118,7 @@ char* js_object_call_function(JSContextRef ctx, JSObjectRef obj, } /** - * Retrune a new allocates string for given value reference. + * Returns a new allocates string for given value reference. * String must be freed if not used anymore. */ char* js_ref_to_string(JSContextRef ctx, JSValueRef ref) @@ -164,7 +164,7 @@ void vb_set_input_text(const char *text) /** * Retrieves the content of the command line. - * Retruned string must be freed with g_free. + * Returned string must be freed with g_free. */ char *vb_get_input_text(void) { @@ -229,7 +229,7 @@ gboolean vb_load_uri(const Arg *arg) } else { /* Load a web page into the browser instance */ webkit_web_view_load_uri(vb.gui.webview, uri); - /* show the url to be opened in the windo title until we receive the + /* show the url to be opened in the window title until we receive the * page title */ OVERWRITE_STRING(vb.state.title, uri); update_title(); @@ -374,7 +374,7 @@ void vb_update_urlbar(const char *uri) void vb_quit(gboolean force) { - /* if not forced quit - don't quit if there are still runinng downloads */ + /* if not forced quit - don't quit if there are still running downloads */ if (!force && vb.state.downloads) { vb_echo_force(VB_MSG_ERROR, true, "Can't quit: there are running downloads"); return; @@ -1137,7 +1137,7 @@ static gboolean navigation_decision_requested_cb(WebKitWebView *view, WebKitWebNavigationAction *action, WebKitWebPolicyDecision *policy, gpointer data) { - /* try to find a protocall handler to open the uri */ + /* try to find a protocol handler to open the uri */ return handle_uri(webkit_network_request_get_uri(request)); } @@ -1233,7 +1233,7 @@ gboolean vb_download(WebKitWebView *view, WebKitDownload *download, const char * } if (use_external && *download_cmd) { - /* run download with external programm */ + /* run download with external program */ vb_download_external(view, download, file); g_free(file); @@ -1354,7 +1354,7 @@ static void download_progress_cp(WebKitDownload *download, GParamSpec *pspec) } const char *file = webkit_download_get_destination_uri(download); - /* skip the file protocoll for the display */ + /* skip the file protocol for the display */ if (!strncmp(file, "file://", 7)) { file += 7; } @@ -1364,7 +1364,7 @@ static void download_progress_cp(WebKitDownload *download, GParamSpec *pspec) vb_echo(VB_MSG_NORMAL, false, "Download %s finished", file); } - /* remove the donwload from the list */ + /* remove the download from the list */ vb.state.downloads = g_list_remove(vb.state.downloads, download); vb_update_statusbar(); @@ -1379,7 +1379,7 @@ int main(int argc, char *argv[]) static GOptionEntry opts[] = { {"cmd", 'C', 0, G_OPTION_ARG_STRING, &vb.config.autocmd, "Ex command run before first page is loaded", NULL}, - {"config", 'c', 0, G_OPTION_ARG_STRING, &vb.config.file, "Custom cufiguration file", NULL}, + {"config", 'c', 0, G_OPTION_ARG_STRING, &vb.config.file, "Custom configuration file", NULL}, {"embed", 'e', 0, G_OPTION_ARG_STRING, &winid, "Reparents to window specified by xid", NULL}, {"kiosk", 'k', 0, G_OPTION_ARG_NONE, &vb.config.kioskmode, "Run in kiosk mode", NULL}, {"version", 'v', 0, G_OPTION_ARG_NONE, &ver, "Print version", NULL}, @@ -194,7 +194,7 @@ MapState map_handle_keys(const guchar *keys, int keylen, gboolean use_map) /* skip csi indicator and the next 2 chars - if the csi sequence * isn't part of a mapped command we let gtk handle the key - this - * is required allo to move cursor in inputbox with <Left> and + * is required allow to move cursor in inputbox with <Left> and * <Right> keys */ if ((map.queue[0] & 0xff) == CSI && map.qlen >= 3) { /* get next 2 chars to build the termcap key */ @@ -215,7 +215,7 @@ MapState map_handle_keys(const guchar *keys, int keylen, gboolean use_map) memmove(map.queue, map.queue + 1, map.qlen); } - /* remove the nomap flag */ + /* remove the no-map flag */ vb.mode->flags &= ~FLAG_NOMAP; /* send the key to the parser */ diff --git a/src/normal.c b/src/normal.c index 210e38b..fa45d4a 100644 --- a/src/normal.c +++ b/src/normal.c @@ -327,7 +327,7 @@ void normal_showcmd(int c) } /** - * Transalte a singe char into a readable representation to be show to the + * Translate a singe char into a readable representation to be show to the * user in status bar. */ static char *transchar(int c) @@ -32,7 +32,7 @@ extern VbCore vb; */ void pass_enter(void) { - /* switch focus first to make shure we can write to the inputbox without + /* switch focus first to make sure we can write to the inputbox without * disturbing the user */ gtk_widget_grab_focus(GTK_WIDGET(vb.gui.webview)); vb_echo(VB_MSG_NORMAL, false, "-- PASS THROUGH --"); diff --git a/src/setting.c b/src/setting.c index e0bf6c0..9164b05 100644 --- a/src/setting.c +++ b/src/setting.c @@ -39,8 +39,8 @@ typedef enum { typedef enum { SETTING_SET, /* :set option=value */ - SETTING_APPEND, /* :set option+=vlaue */ - SETTING_PREPEND, /* :set option^=vlaue */ + SETTING_APPEND, /* :set option+=value */ + SETTING_PREPEND, /* :set option^=value */ SETTING_REMOVE, /* :set option-=value */ SETTING_GET, /* :set option? */ SETTING_TOGGLE /* :set option! */ @@ -48,7 +48,7 @@ typedef enum { enum { FLAG_LIST = (1<<1), /* setting contains a ',' separated list of values */ - FLAG_NODUP = (1<<2), /* dont allow duplicate strings within list values */ + FLAG_NODUP = (1<<2), /* don't allow duplicate strings within list values */ }; extern VbCore vb; @@ -357,7 +357,7 @@ free: } /** - * Prepares the vlaue for the setting for the diefferent setting types. + * Prepares the value for the setting for the different setting types. * Return value true indicates that the memory of newvalue must be freed by * the caller. */ @@ -370,7 +370,7 @@ static gboolean prepare_setting_value(Setting *prop, void *value, SettingType ty if ((type != SETTING_APPEND && type != SETTING_PREPEND && type != SETTING_REMOVE) || prop->type == TYPE_BOOLEAN ) { - /* if type is not appen, prepend or remove there is nothing to be done */ + /* if type is not append, prepend or remove there is nothing to be done */ *newvalue = value; return res; } diff --git a/src/shortcut.c b/src/shortcut.c index 190f92f..af8eab4 100644 --- a/src/shortcut.c +++ b/src/shortcut.c @@ -57,8 +57,8 @@ gboolean shortcut_remove(const char *key) gboolean shortcut_set_default(const char *key) { - /* do not check if the shotcut exists to be able to set the default - * before defining the shotcut */ + /* do not check if the shortcut exists to be able to set the default + * before defining the shortcut */ OVERWRITE_STRING(default_key, key); return true; @@ -166,7 +166,7 @@ gboolean shortcut_fill_completion(GtkListStore *store, const char *input) } /** - * Retrieves th highest placesholder number used in given string. + * Retrieves th highest placeholder number used in given string. * If no placeholder is found -1 is returned. */ static int get_max_placeholder(const char *str) @@ -187,7 +187,7 @@ static int get_max_placeholder(const char *str) /** * Retrieves the shortcut uri template for given string. And fills given query - * pointer with the query part of the given string (everithing except of the + * pointer with the query part of the given string (everything except of the * shortcut identifier). */ static const char *shortcut_lookup(const char *string, const char **query) @@ -111,7 +111,7 @@ char **util_get_lines(const char *filename) * @filename: file to read items from * @func: function to parse a single line to item * @unique_func: function to decide if two items are equal - * @free_func: function to free already converted item if this isn't unque + * @free_func: function to free already converted item if this isn't unique * @max_items: maximum number of items that are returned, use 0 for * unlimited items */ @@ -121,7 +121,7 @@ GList *util_file_to_unique_list(const char *filename, Util_Content_Func func, GList *gl = NULL; /* yes, the whole file is read and wen possible don not need all the * lines, but this is easier to implement compared to reading the file - * line wise from ent to begining */ + * line wise from end to beginning */ char *line, **lines; void *value; int len, num_items = 0; @@ -137,9 +137,9 @@ GList *util_file_to_unique_list(const char *filename, Util_Content_Func func, return gl; } - /* begin with tha last line of the file to make unique check easier - + /* begin with the last line of the file to make unique check easier - * every already existing item in the list is the latest, so we don't need - * to romove items from the list which takes some time */ + * to remove items from the list which takes some time */ for (int i = len - 1; i >= 0; i--) { line = lines[i]; g_strstrip(line); @@ -169,7 +169,7 @@ GList *util_file_to_unique_list(const char *filename, Util_Content_Func func, /** * Append new data to file. * - * @file: File to appen the data + * @file: File to append the data * @format: Format string used to process va_list */ gboolean util_file_append(const char *file, const char *format, ...) @@ -251,7 +251,7 @@ next: /** * Replaces appearances of search in string by given replace. - * Returne a new allocated string if search was found. + * Returns a new allocated string if search was found. */ char *util_str_replace(const char* search, const char* replace, const char* string) { |