Changeset 2adaf1d
- Timestamp:
- Oct 11, 2002, 3:44:22 PM (21 years ago)
- Branches:
- master, barnowl_perlaim, debian, owl, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
- Children:
- b45293f
- Parents:
- 88736cb
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
ChangeLog
r88736cb r2adaf1d 11 11 segfault 12 12 Fixed some typos in the intro doc 13 Removed old zlog functions from zephyr.c 14 Implemented the dump command 15 New startup message 13 16 14 17 1.2.5 -
commands.c
r486688f r2adaf1d 169 169 "and displays them.\n"), 170 170 171 OWLCMD_ARGS("dump", owl_command_dump, OWL_CTX_ANY, 172 "dump messages to a file", 173 "dump <filename>", 174 "Dump messages in current view to the named file."), 175 171 176 OWLCMD_ARGS("smartzpunt", owl_command_smartzpunt, OWL_CTX_INTERACTIVE, 172 177 "creates a zpunt based on the current message", … … 779 784 sprintf(buff, "Owl version %s", OWL_VERSION_STRING); 780 785 owl_function_makemsg(buff); 786 } 787 788 char *owl_command_dump(int argc, char **argv, char *buff) { 789 if (argc!=2) { 790 owl_function_makemsg("usage: dump <filename>"); 791 return(NULL); 792 } 793 794 owl_function_dump(argv[1]); 795 return(NULL); 781 796 } 782 797 -
functions.c
r88736cb r2adaf1d 6 6 #include <com_err.h> 7 7 #include <time.h> 8 #include <sys/types.h> 9 #include <sys/stat.h> 8 10 #include "owl.h" 9 11 … … 2461 2463 owl_free(ourfile); 2462 2464 } 2465 2466 void owl_function_dump(char *filename) { 2467 int i, j, count; 2468 owl_message *m; 2469 owl_view *v; 2470 FILE *file; 2471 /* struct stat sbuf; */ 2472 2473 v=owl_global_get_current_view(&g); 2474 2475 /* in the future make it ask yes/no */ 2476 /* 2477 ret=stat(filename, &sbuf); 2478 if (!ret) { 2479 ret=owl_function_askyesno("File exists, continue? [Y/n]"); 2480 if (!ret) return; 2481 } 2482 */ 2483 2484 file=fopen(filename, "w"); 2485 if (!file) { 2486 owl_function_makemsg("Error opening file"); 2487 return; 2488 } 2489 2490 count=0; 2491 j=owl_view_get_size(v); 2492 for (i=0; i<j; i++) { 2493 m=owl_view_get_element(v, i); 2494 fputs(owl_message_get_text(m), file); 2495 } 2496 fclose(file); 2497 } -
zephyr.c
rbde7714 r2adaf1d 173 173 } 174 174 return(0); 175 }176 177 178 void zlog_in() {179 int ret;180 181 ret=ZSetLocation(EXPOSE_NETVIS);182 /* do something on failure */183 }184 185 void zlog_out() {186 int ret;187 188 ret=ZUnsetLocation();189 /* do something on failure */190 175 } 191 176
Note: See TracChangeset
for help on using the changeset viewer.