Changeset 95474d7 for functions.c
- Timestamp:
- Jan 3, 2005, 10:34:02 PM (19 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:
- 15b34fd
- Parents:
- 4e0f545
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
functions.c
r8232149 r95474d7 854 854 } 855 855 856 857 /* Load zephyr subscriptions from the named 'file' and load zephyr's 858 * default subscriptions as well. An error message is printed if 859 * 'file' can't be opened or if zephyr reports an error in 860 * subscribing. 861 * 862 * If 'file' is NULL, this look for the default filename 863 * $HOME/.zephyr.subs. If the file can not be opened in this case 864 * only, no error message is printed. 865 */ 856 866 void owl_function_loadsubs(char *file) 857 867 { 858 868 int ret, ret2; 859 860 ret=owl_zephyr_loadsubs(file); 869 char *foo; 870 871 if (file==NULL) { 872 ret=owl_zephyr_loadsubs(NULL, 0); 873 } else { 874 ret=owl_zephyr_loadsubs(file, 1); 875 } 861 876 862 877 /* for backwards compatibility for now */ … … 864 879 865 880 if (!owl_context_is_interactive(owl_global_get_context(&g))) return; 866 if (ret==0) { 867 owl_function_makemsg("Subscribed to messages from file."); 881 882 foo=file?file:"file"; 883 if (ret==0 && ret2==0) { 884 if (!file) { 885 owl_function_makemsg("Subscribed to messages."); 886 } else { 887 owl_function_makemsg("Subscribed to messages from %s", file); 888 } 868 889 } else if (ret==-1) { 869 owl_function_error("Could not open file.");890 owl_function_error("Could not read %s", foo); 870 891 } else { 871 owl_function_error("Error subscribing to messages from file.");892 owl_function_error("Error subscribing to messages"); 872 893 } 873 894 }
Note: See TracChangeset
for help on using the changeset viewer.