summaryrefslogtreecommitdiff
path: root/src/linkedlist.h
AgeCommit message (Collapse)Author
2016-11-17Add xrandr supportMathieu OTHACEHE
Drop deprecated xinerama support and replace it with xrandr. Signed-off-by: Mathieu OTHACEHE <m.othacehe@gmail.com>
2014-02-20Test for __builtin_prefetch, not for __GNUC__.Jérémie Courrèges-Anglas
* Fixes build with pcc.
2009-07-15use gcc's __builtin_prefetch if available to silence problems with the empty ↵Bernhard R. Link
prefetch function
2006-03-16remove tabs and trailing whitespace.sabetts
2005-01-15 * src/actions.c (ARG_STRING): new definesabetts
(ARG): likewise (set_vars): change to a list_head. (add_set_var): new function (init_set_vars): likewise (user_commands): change to a list_head. Move command definitions to init_user_commands. (add_command): new function (init_user_commands): likewise (cmdret_new): likewise (cmdret_new_printf): likewise (cmdret_free): likewise (read_string): likewise (read_keymap): likewise (read_keydesc): likewise (read_command): likewise (read_shellcmd): likewise (read_frame): likewise (read_window): likewise (read_gravity): likewise (read_group): likewise (read_hook): likewise (read_variable): likewise (hook_completions): likewise (read_number): likewise (read_arg): likewise (parsed_input_to_args): likewise (fill_in_missing_args): likewise (parse_args): likewise (arg_array): likewise (arg_free): likewise (command): use parse_args, parsed_input_to_args, fill_in_missing_args to parse arguments and pass to command functions. (command): return cmdret* structure. prototype updated. (cmd_abort): second arg is an array of struct cmdarg*. Return cmdret*. Updated to use new parsed arguments. (cmd_addhook): likewise (cmd_alias): likewise (cmd_banish): likewise (cmd_bind): likewise (cmd_chdir): likewise (cmd_clrunmanaged): likewise (cmd_colon): likewise (cmd_curframe): likewise (cmd_delete): likewise (cmd_echo): likewise (cmd_escape): likewise (cmd_exec): likewise (cmd_fdump): likewise (cmd_focusdown): likewise (cmd_focuslast): likewise (cmd_focusleft): likewise (cmd_focusright): likewise (cmd_focusup): likewise (cmd_frestore): likewise (cmd_fselect): likewise (cmd_gdelete): likewise (cmd_getenv): likewise (cmd_gmerge): likewise (cmd_gmove): likewise (cmd_gnew): likewise (cmd_gnewbg): likewise (cmd_gnext): likewise (cmd_gprev): likewise (cmd_gravity): likewise (cmd_groups): likewise (cmd_gselect): likewise (cmd_h_split): likewise (cmd_help): likewise (cmd_info): likewise (cmd_kill): likewise (cmd_last): likewise (cmd_lastmsg): likewise (cmd_license): likewise (cmd_link): likewise (cmd_listhook): likewise (cmd_meta): likewise (cmd_msgwait): likewise (cmd_newwm): likewise (cmd_next): likewise (cmd_next_frame): likewise (cmd_nextscreen): likewise (cmd_number): likewise (cmd_only): likewise (cmd_other): likewise (cmd_prev): likewise (cmd_prev_frame): likewise (cmd_prevscreen): likewise (cmd_quit): likewise (cmd_redisplay): likewise (cmd_remhook): likewise (cmd_remove): likewise (cmd_rename): likewise (cmd_resize): likewise (cmd_restart): likewise (cmd_rudeness): likewise (cmd_select): likewise (cmd_setenv): likewise (cmd_shrink): likewise (cmd_source): likewise (cmd_startup_message): likewise (cmd_time): likewise (cmd_tmpwm): likewise (cmd_unalias): likewise (cmd_unbind): likewise (cmd_unimplemented): likewise (cmd_unmanage): likewise (cmd_unsetenv): likewise (cmd_v_split): likewise (cmd_verbexec): likewise (cmd_version): likewise (cmd_warp): likewise (cmd_windows): likewise (cmd_readkey): likewise (cmd_newkmap): likewise (cmd_delkmap): likewise (cmd_definekey): likewise (cmd_undefinekey): likewise (cmd_set): likewise (cmd_sselect): likewise (cmd_ratwarp): likewise (cmd_ratclick): likewise (cmd_ratrelwarp): likewise (cmd_rathold): likewise (cmd_cnext): likewise (cmd_cother): likewise (cmd_cprev): likewise (cmd_dedicate): likewise (cmd_describekey): likewise (cmd_inext): likewise (cmd_iother): likewise (cmd_iprev): likewise (cmd_prompt): likewise (cmd_sdump): likewise (cmd_sfdump): likewise (cmd_undo): likewise (cmd_putsel): likewise (cmd_getsel): likewise (set_resizeunit): arg is an array of struct cmdarg*. Return cmdret*. Updated to use new parsed arguments. (set_wingravity): likewise (set_transgravity): likewise (set_maxsizegravity): likewise (set_bargravity): likewise (set_font): likewise (set_padding): likewise (set_border): likewise (set_barborder): likewise (set_inputwidth): likewise (set_waitcursor): likewise (set_winfmt): likewise (set_winname): likewise (set_fgcolor): likewise (set_bgcolor): likewise (set_barpadding): likewise (set_winliststyle): likewise (set_framesels): likewise (set_maxundos): likewise * src/actions.h: include ratpoison.h (argtype): add arg_FRAME, arg_WINDOW, arg_COMMAND, arg_SHELLCMD, arg_KEYMAP, arg_KEY, arg_GRAVITY, arg_GROUP, arg_HOOK, arg_VARIABLE. (union arg_union): new union (struct cmdarg): new struct (struct argspec): likewise (struct cmdret): likewise (user_command): change func to reflect new command function args. add num_args, ni_required_args, i_required_args. (RP_CMD): new macro for prototyping command functions. all command function prototypes updated to use this macro. (init_user_commands): new prototype (cmdret_free): likewise * src/main.c (read_rc_file): handle cmdret* returned by command. (main): call init_user_commands * src/linkedlist.h (list_size): new prototype * src/linkedlist.c (list_size): new function * src/globals.h (RET_SUCCESS): new define (RET_FAILURE): new define * src/events.c (handle_key): handle the cmdret structure returned by command. (execute_remote_command): return cmdret*. (receive_command): mark the command return string as error or output before sending. * src/data.h (struct rp_action): change data element type to char* * src/communications.c (receive_command_result): print command output to stderr if marked as an error.
2004-12-04update copyright.sabetts
2004-12-02Updated copyright notices.sabetts
2004-11-19* src/actions.c (set_vars): add maxundossabetts
(push_frame_undo): new function (pop_frame_undo): likewise (initialize_default_keybindings): add binding for "undo" (initialize_default_keybindings): add def alias for maxundos (cmd_other): call set_active_window_force instead of set_active_window (cmd_v_split): push the frame set (cmd_h_split): likewise (cmd_only): likewise (cmd_remove): likewise (cmd_shrink): likewise (cmd_tmpwm): likewise (cmd_license): update copyright. Add build date and time. (cmd_fselect): simplify code that returns the frame selected. (fdump): new function (cmd_fdump): call fdump to dump the screen's frame set. (frestore): new function (cmd_frestore): call frestore to restore the screen's frame set. (cmd_sfdump): new function (cmd_sdump): likewise (set_maxundos): likewise (cmd_cnext): likewise (cmd_cprev): likewise (cmd_inext): likewise (cmd_iprev): likewise (cmd_cother): likewise (cmd_iother): likewise (cmd_undo): likewise (cmd_prompt): likewise (cmd_describekey): likewise (cmd_dedicate): likewise * src/main.c (init_defaults): init maxundos to 20 (clean_up): free the undo history lists * src/window.h (set_active_window_body): new function (set_active_window_force): likewise * src/window.c (set_active_window): new function (set_active_window_force): likewise (set_active_window_body): renamed from set_active_window (set_active_window_body): Add code to handle dedicated frames. * src/screen.h (screen_dump): new prototype * src/screen.c (screen_dump): new function * src/linkedlist.h (list_last): new macro * src/group.h (group_last_window_by_class_complement): new prototype (group_last_window_by_class): likewise * src/group.c (group_last_window_by_class): new function (group_last_window_by_class_complement): likewise * src/globals.h (rp_frame_undos): new extern. (rp_num_frame_undos): likewise * src/globals.c (rp_frame_undos): new list. (rp_num_frame_undos): new global * src/frame.c (frame_new): init f->dedicated to 0. * src/data.h (struct rp_frame): add dedicated member. (struct rp_defaults): add maxundos member. (struct rp_frame_undo): new struct. * src/actions.c: new commands, cnext, cother, cprev,
2003-05-27* src/editor.c (saved_command): new local globalsabetts
(edit_binding): new typedef (edit_binding): new struct (edit_bindings): new local global (input_line_new): new function (input_line_free): likewise (execute_edit_action): likewise (editor_forward_char): likewise (editor_backward_char): likewise (editor_forward_word): likewise (editor_backward_word): likewise (editor_beginning_of_line): likewise (editor_end_of_line): likewise (editor_delete_char): likewise (editor_backward_delete_char): likewise (editor_kill_word): likewise (editor_backward_kill_word): likewise (editor_kill_line): likewise (editor_backward_kill_line): likewise (editor_history_previous): likewise (editor_history_next): likewise (editor_abort): likewise (editor_no_action): likewise (editor_insert): likewise (editor_enter): likewise (paste_cut_buffer): likewise (paste_primary_selection): likewise (editor_paste_selection): likewise (editor_complete): likewise (editor_forward_char): new prototype (editor_backward_char): likewise (editor_forward_word): likewise (editor_backward_word): likewise (editor_beginning_of_line): likewise (editor_end_of_line): likewise (editor_delete_char): likewise (editor_backward_delete_char): likewise (editor_kill_word): likewise (editor_backward_kill_word): likewise (editor_kill_line): likewise (editor_paste_selection): likewise (editor_abort): likewise (editor_no_action): likewise (editor_enter): likewise (editor_history_previous): likewise (editor_history_next): likewise (editor_complete): likewise (editor_backward_kill_line): likewise * src/sbuf.h (sbuf): add node field. * src/main.c (xrealloc): don't print debugger output (init_defaults): init history_size (main): initialize rp_selection (main): load history (clean_up): save history * src/linkedlist.h (list_first): new macro * src/input.h (free_history): remove prototype (ring_bell): new function * src/input.c: include unistd.h (input_history): remove (input_num_history_entries): likewise (update_input_window): remove prompt, input, and input_len arguments. add line argument. (update_input_window): use line argument. (ring_bell): new function (get_input): take completion_fn argument. prototype and callers updated. (free_history): remove function (get_more_input): take completion_fn argument. prototype and callers updated. use line structure and its functionality. * src/globals.h (MAX_FONT_WIDTH): new define (rp_selection): new extern * src/globals.c (rp_selection): new global * src/completions.h (completions_new): new prototype (completions_free): likewise (completions_assign): likewise (completions_update): likewise (completions_next_completion): likewise * src/completions.c (completions_new): new function (completions_free): likewise (completions_assign): likewise (completions_update): likewise (completions_next_completion): likewise * src/Makefile.am (ratpoison_SOURCES): add editor.c editor.h history.h and history.c * src/data.h (rp_completions): new typedef (rp_input_line): likewise (completion_fn): likewise (rp_defaults): new field, history_size (rp_completions): new struct (rp_input_line): new struct * src/conf.h (MAX_HISTORY_SIZE): new define (HISTORY_FILE): likewise (VISUAL_BELL): likewise (MODIFIER_PREFIX): set to RP_CONTROL_MASK (INPUT_ABORT_MODIFIER): likewise (INPUT_PREV_HISTORY_MODIFIER): likewise (INPUT_NEXT_HISTORY_MODIFIER): likewise (RESIZE_VGROW_MODIFIER): likewise (RESIZE_VSHRINK_MODIFIER): likewise (RESIZE_HGROW_MODIFIER): likewise (RESIZE_HSHRINK_MODIFIER): likewise * src/actions.c (trivial_completions): new function (window_completions): likewise (colon_completions): likewise (exec_completions): likewise (cmd_select): pass window_completions to get_input (cmd_rename): pass trivial_completions to get_input (cmd_colon): pass colon_completions to get_input and get_more_input (cmd_exec): pass exec_completions to get_input (cmd_newwm): pass trivial_completions to get_input (cmd_resize): convert the keysym modifier to something ratpoison understands.
2003-05-25* src/window.c: do not include ctype.hsabetts
* src/ratpoison.h (str_comp): new prototype * src/messages.h (MESSAGE_PROMPT_SWITCH_TO_GROUP): new define * src/main.c: include ctype.h (str_comp): moved from window.c * src/group.h (groups_find_group_by_name): new prototype. (groups_find_group_by_number): likewise. (groups_merge): likewise (group_move_window): likewise * src/group.c: include string.h (group_new): new argument, name. All callers updated. prototype updated. (init_groups): create the first group with DEFAULT_GROUP_NAME as its name. (group_new): new argument, name. All callers updated. Prototype updated. (group_free): free the group's name. (group_add_new_group): new argument, name. All callers updated. Prototype updated. (groups_find_group_by_name): new function (groups_find_group_by_number): likewise (group_move_window): likewise (groups_merge): likewise * src/conf.h (DEFAULT_GROUP_NAME): new define * src/actions.h (cmd_gselect): new prototype (cmd_groups): likewise (cmd_gmove): likewise (cmd_gmerge): likewise (cmd_gnewbg): likewise * src/actions.c (user_commands): new commands gselect, groups, gmove, gmerge, gnewbg. (cmd_gnewbg): new function (find_group): likewise (cmd_gselect): likewise (cmd_groups): likewise (cmd_gmove): likewise (cmd_gmerge): likewise
2003-05-20 * src/linkedlist.h: Move all C function to linkedlist.csabetts
* src/window.c (find_window): add debugging output describing which window list the window was found in. * src/group.c (group_new): assign the group's number the number passed as an argument. * src/events.c (destroy_window): withdraw iconified and normal windows before unmanaging them. (handle_signals): delete the node from the list before freeing it. * src/bar.h (message): remove define. (marked_wrapped_message): remove prototype (message): new prototype * src/bar.c (message): new function (marked_wrapped_message): renamed to marked_message. remove marked_message.
2003-02-22(list_direction_entry): no longer returns NULLsabetts
if there is only one element in the list. Instead, returns the same element again and again.
2003-02-22* src/actions.c (cmd_number): use list delete entry macrosabetts
(cmd_number): likewise (cmd_escape): use list looping macro (cmd_escape): likewise (cmd_defpadding): likewise (cmd_defborder): likewise * src/data.h: include linkedlist.h (struct rp_window_frame): use struct list_head instead of next, prev pointers. (struct rp_window): likewise (struct screen_info): rename rp_window_frame_sentinel to rp_window_frames and change it's type to list_head. * src/events.c (mapping_notify): use list looping macro (mapping_notify): likewise * src/list.c: rename rp_unmapped_window_sentinel to rp_unmapped_window and rp_mapped_window_sentinel to rp_mapped_window. Use LIST_HEAD to create them. externs updated. (add_to_window_list): use list add entry macro. (find_window_in_list): list head is of type list_head. Prototype and callers updated. (find_window_in_list): use list looping macro (init_window_list): remove function (find_window_number): use list looping macro (find_window_name): likewise (find_window_prev): use list previous entry macro (find_window_next): use list next entry macro (find_window_other): use list looping macro (append_to_list): remove function (insert_into_list): use list looping macro (insert_into_list): use list add entry macro (remove_from_list): remove function (get_window_list): use list looping macro * src/main.c (main): do not call init_window_list() * src/manage.c (unmanage): use list delete macro (map_window): likewise (withdraw_window): use list moving macro to move entry to another list. (hide_others): use list looping macro * src/split.c (num_frames): use list looping macro (frames_screen): likewise (maximize_all_windows_in_frame): likewise (delete_frame_from_list): remove function (create_initial_frame): remove list init code. Add current frame to screen's frame list. (init_frame_list): use list init macro (find_last_frame): use list looping macro (find_windows_frame): likewise (find_frame_next): use list next entry macro (find_frame_prev): use list previous entry macro (find_window_for_frame): use list looping macro (split_frame): use list add entry macro (remove_all_splits): use list looping macro (resize_frame_vertically): likewise (resize_frame_horizontally): likewise (total_frame_area): likewise (frame_overlaps): likewise (remove_frame): likewise (find_frame_up): likewise (find_frame_down): likewise (find_frame_left): likewise (find_frame_right): likewise