summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2014-03-24Avoid malloc(0) in add_command.Jérémie Courrèges-Anglas
2014-03-24Install ratpoison.el in share/emacs/site-lispJérémie Courrèges-Anglas
2014-03-24In frestore flag a frame_read error as appropriate.Jérémie Courrèges-Anglas
* while here kill a stray ';'
2014-03-24Factorize code in cmd_fdump.Jérémie Courrèges-Anglas
2014-03-24Factorize code in update_{window,group}_names.Jérémie Courrèges-Anglas
2014-03-24Indent function calls in unmanaged_window.Jérémie Courrèges-Anglas
2014-03-24Make unmanaged_window cheaper.Jérémie Courrèges-Anglas
* No need to get then free the window name in the loop, do it out of the loop.
2014-03-24Kill decls forgotten in a5ee817 "Kill code #if 0'ed since 2001."Jérémie Courrèges-Anglas
2014-03-24read_startup_files doesn't mangle its argument.Jérémie Courrèges-Anglas
2014-03-24Don't dup args passed on the cli, we don't mangle them.Jérémie Courrèges-Anglas
2014-03-24Put history_expand_line's return type on its own line.Jérémie Courrèges-Anglas
2014-03-24In history_add_upto make sure we don't dereference a NULL pointer;Jérémie Courrèges-Anglas
2014-03-24Kill history_resize, unused.Jérémie Courrèges-Anglas
2014-03-24Kill unused and forgotten include of assert.h in bar.cJérémie Courrèges-Anglas
2014-03-24Kill code and simplify cmd_numberJérémie Courrèges-Anglas
* cmd_number needs at least one argument * The code that handled the zero argument case was thus unreachable, and was the last user of print_window_information, so kill that function.
2014-03-04Kill last strcpy occurrence.Jérémie Courrèges-Anglas
* replace_keybinding is seldom used, no need to half-optimize it
2014-03-04strcpy -> memcpyJérémie Courrèges-Anglas
* since we have to know the string length anyway
2014-03-04strncpy -> memcpy.Jérémie Courrèges-Anglas
* we NUL-terminate it anyway * kill a useless "* sizeof (char)" while here
2014-03-04Kill useless comment.Jérémie Courrèges-Anglas
2014-03-04Simplify init_screen using sbufJérémie Courrèges-Anglas
2014-03-04Simplify read_shellcmd using sbufJérémie Courrèges-Anglas
2014-03-04Small coding standards fix.Jérémie Courrèges-Anglas
2014-03-04Simplify list_unmanaged_windows using sbufJérémie Courrèges-Anglas
2014-03-04More decls/code separation. More spacing too.Jérémie Courrèges-Anglas
2014-03-04Use get_homedir anywhere we can.Jérémie Courrèges-Anglas
2014-03-04get_homedir(), checks HOME and the password databaseJérémie Courrèges-Anglas
* ensures that the resulting home directory isn't the empty string (else returns NULL)
2014-03-03Refine error messages in cmd_fdump.Jérémie Courrèges-Anglas
2014-03-03Add error checking to set_padding and set_historysize.Jérémie Courrèges-Anglas
2014-03-03Add error checking for various boolean (0|1) settings.Jérémie Courrèges-Anglas
2014-03-03Correct error message in set_barinpadding.Jérémie Courrèges-Anglas
2014-03-03Factorize space for invalid negative args messages in various settings.Jérémie Courrèges-Anglas
2014-03-03Make read_number more strict, returning errors.Jérémie Courrèges-Anglas
* use strtol, and warn about overflow or invalid input.
2014-03-03In read_frame, don't silently ignore invalid/unknown frame selectors.Jérémie Courrèges-Anglas
2014-03-03Rename (again) string_to_number to string_to_positive_numberJérémie Courrèges-Anglas
* where it is used, only (small) positive numbers make sense. * While here use strtol instead of manually parsing the string, and be careful about validation. (Still) return -1 to indicate failure.
2014-03-03Amend find_group: first match by number, then by name.Jérémie Courrèges-Anglas
* this is consistent with cmd_select and read_window. If one has a keybinding for "gselect 0" and then happens to have a group named "0", "gselect 0" should keep the same behavior: lead to group numbered 0. Discussed with |cos| who proposed the recent "search groups for exact name match first".
2014-03-03Search windows names for exact match then for fuzzy matchJérémie Courrèges-Anglas
* Contrary to the recent find_group change, windows are still searched by number first. This is inconsistent and a choice has to be made.
2014-03-03Fix cmd_getsel when there is no X selectionJérémie Courrèges-Anglas
* instead of feeding stdio a NULL string and invoking undefined behavior, return a failure
2014-03-03In set_winname compare the full string, including the final NUL.Jérémie Courrèges-Anglas
* detects erroneous inputs such as "titlefoo" instead of "title"
2014-03-03"deffoo..." -> "set foo..." in the error messages.Jérémie Courrèges-Anglas
* "deffoo"-style names are only compat aliases these days.
2014-03-03Better, faster, prettier groups_find_by_group_nameJérémie Courrèges-Anglas
* there are really two operation modes that could even be put into separate functions. So disentangle the logic and put the operation mode check outside of the loop parsing the groups list.
2014-03-03Rename string_to_window_number to string_to_number.Jérémie Courrèges-Anglas
* The previous name didn't make sense since it was also used for group numbers. * This function should probably make more checks or be deleted.
2014-03-03Fix a typo in a comment.Jérémie Courrèges-Anglas
2014-03-03Silence warning in previous commit.Jérémie Courrèges-Anglas
2014-03-02Allow exact matching with gselect.fix/gselect_exact_matchcos
When having two groups where the second one's name partially matches the name of the first one, it is hard to gselect the second one. Similarly it is not possible to select groups with fully numerical names. e.g. If having the group list: 0-default 1*other 2-de 3-0 The user expactation when typing ":gselect de" or ":gselect 0" would likely be to select group number 2 & group number 3 respectively. This commit modifies the behaviour of gselect, to primarily select the group with an exactly matching name if possible, before trying numerical or partial matches.
2014-02-20Fall back to ioctl(TIOCNOTTY) to detach from the controlling terminal.Jérémie Courrèges-Anglas
* As with setpgid, only do this if setsid fails or is absent.
2014-02-20Only call setpgid when setsid fails or is absent.Jérémie Courrèges-Anglas
2014-02-20Detect pwd.h and getpwuid.Jérémie Courrèges-Anglas
2014-02-20If HOME is not set in the env., fallback to the passwd entry.Jérémie Courrèges-Anglas
* No attempt to detect pwd.h / getpwuid, not sure if needed.
2014-02-20Mark the X socket as to be closed on exec.Jérémie Courrèges-Anglas
* Avoids leaking a descriptor, and potential problems described in the comp.windows.x FAQ.
2014-02-20Change set_close_on_exec to take a file descriptor.Jérémie Courrèges-Anglas
* Since it's easier to get a fd from a FILE * rather than the other way around.