Changeset 4197
- Timestamp:
- 06/03/06 19:56:51 (2 years ago)
- Files:
-
- wire/trunk/NEWS (modified) (1 diff)
- wire/trunk/README (modified) (1 diff)
- wire/trunk/man/wire.1 (modified) (1 diff)
- wire/trunk/wire/client.c (modified) (1 diff)
- wire/trunk/wire/client.h (modified) (1 diff)
- wire/trunk/wire/commands.c (modified) (3 diffs)
- wire/trunk/wire/main.c (modified) (1 diff)
- wire/trunk/wire/windows.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
wire/trunk/NEWS
r4140 r4197 4 4 1.1.1 5 5 - Add new /icon command, takes a path to an image file to use as icon 6 - Add new /timestamp command, disables or changes format of timestamps 6 7 - Fix a crash with parsing dates on some platforms 7 8 - Fix a crash in /cd wire/trunk/README
r3250 r4197 14 14 ============ 15 15 16 - Erik Tengblad, erik@tengblad.net 16 - Erik Tengblad 17 - christ25 wire/trunk/man/wire.1
r4107 r4197 263 263 .Pp 264 264 Example: /stop 1 265 .It Nm timestamp Op Ar format 266 Without arguments, disables the timestamps. With an argument, sets the timestamp format, a la 267 .Xr strftime 3 . 268 Default is 269 .Sq %H:%M . 270 .Pp 271 Example: /timestamp %H:%M:%S 265 272 .It Nm topic Op Ar message 266 273 Without arguments, prints the current chat topic. With an argument, sets a new topic. wire/trunk/wire/client.c
r4134 r4197 88 88 wi_string_t *wr_login; 89 89 wi_string_t *wr_password; 90 91 wi_string_t *wr_timestamp_format; 90 92 91 93 static const char wr_default_icon[] = wire/trunk/wire/client.h
r4107 r4197 72 72 extern wi_string_t *wr_login; 73 73 extern wi_string_t *wr_password; 74 extern wi_string_t *wr_timestamp_format; 74 75 75 76 extern uint64_t wr_received_bytes; wire/trunk/wire/commands.c
r4154 r4197 90 90 static void wr_cmd_status(wi_array_t *); 91 91 static void wr_cmd_stop(wi_array_t *); 92 static void wr_cmd_timestamp(wi_array_t *); 92 93 static void wr_cmd_topic(wi_array_t *); 93 94 static void wr_cmd_type(wi_array_t *); … … 295 296 true, 1, -1, WR_COMPLETER_NONE, 296 297 wr_cmd_stop }, 298 { "timestamp", 299 true, "[<format>]", 300 false, 0, 0, WR_COMPLETER_NONE, 301 wr_cmd_timestamp }, 297 302 { "topic", 298 303 true, "[<topic>]", … … 1412 1417 1413 1418 /* 1419 /timestamp <format> 1420 */ 1421 1422 static void wr_cmd_timestamp(wi_array_t *arguments) { 1423 if(wi_array_count(arguments) == 0) { 1424 wi_release(wr_timestamp_format); 1425 wr_timestamp_format = wi_retain(WI_STR("")); 1426 } else { 1427 wi_release(wr_timestamp_format); 1428 wr_timestamp_format = wi_retain(WI_ARRAY(arguments, 0)); 1429 } 1430 } 1431 1432 1433 1434 /* 1414 1435 /topic <topic> 1415 1436 */ wire/trunk/wire/main.c
r4021 r4197 80 80 wi_load(argc, argv); 81 81 82 pool = wi_pool_init(wi_pool_alloc());83 wi_log_callback = wr_wi_log_callback;82 pool = wi_pool_init(wi_pool_alloc()); 83 wi_log_callback = wr_wi_log_callback; 84 84 85 85 /* init core systems */ 86 86 wr_init_version(); 87 wr_start_date = wi_date_init(wi_date_alloc());87 wr_start_date = wi_date_init(wi_date_alloc()); 88 88 89 89 /* set defaults */ 90 wr_nick = wi_retain(wi_user_name()); 91 homepath = wi_user_home(); 90 wr_nick = wi_retain(wi_user_name()); 91 homepath = wi_user_home(); 92 wr_timestamp_format = wi_retain(WI_STR("%H:%M")); 92 93 93 94 /* parse command line switches */ wire/trunk/wire/windows.c
r4028 r4197 383 383 wi_string_t *timestamp; 384 384 385 timestamp = wi_date_string_with_format(wi_date(), WI_STR("%H:%M"));385 timestamp = wi_date_string_with_format(wi_date(), wr_timestamp_format); 386 386 387 387 if(wi_terminal_buffer_printf(window->buffer, WI_STR("%@ %@"), timestamp, string)) {
