diff options
author | sabetts <sabetts> | 2001-04-15 21:25:10 +0000 |
---|---|---|
committer | sabetts <sabetts> | 2001-04-15 21:25:10 +0000 |
commit | b87be52b56c7f62294c49c40a49c766b958d0809 (patch) | |
tree | 34a8eb4bae8f1ad42990457715156fe1378264f7 /src/list.c | |
parent | 58b76fc72cd88e4a6a45b12f97810e63c75e97d6 (diff) | |
download | ratpoison-b87be52b56c7f62294c49c40a49c766b958d0809.zip |
* src/number.h (add_window_number): new prototype
* src/number.c (add_window_number): renamed from
add_to_list. Dependant code updated.
* src/messages.h (MESSAGE_WINDOW_INFORMATION): new define
* src/list.h (print_window_information): new prototype
* src/list.c (print_window_information): new function
* src/actions.h (cmd_number): new prototype
Diffstat (limited to 'src/list.c')
-rw-r--r-- | src/list.c | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -439,3 +439,23 @@ goto_window (rp_window *win) set_active_window (win); } } + +void +print_window_information (rp_window *win) +{ + char number[3]; + char *str; + + snprintf (number, 3, "%d", win->number); + + /* There is a bit of extra memory being allocated from the + formatting tags in MESSAGE_WINDOW_INFORMATION, but it is not a + couple bytes. */ + str = xmalloc (strlen (number) + strlen (win->name) + strlen (MESSAGE_WINDOW_INFORMATION) + 1); + + sprintf (str, MESSAGE_WINDOW_INFORMATION, number, win->name); + message (str); + free (str); + + return; +} |