Changeset f17bff98 for functions.c


Ignore:
Timestamp:
Oct 19, 2003, 11:30:00 PM (17 years ago)
Author:
James M. Kretchmar <kretch@mit.edu>
Branches:
master, barnowl_perlaim, debian, owl, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
4664c96
Parents:
c15bbfb
Message:
Added the 'show startup' command
Alphebetized 'show' help.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • functions.c

    rf51bc78 rf17bff98  
    12041204  owl_viewwin_redisplay(v, 0);
    12051205  owl_global_set_needrefresh(&g);
     1206}
     1207
     1208void owl_function_popless_file(char *filename)
     1209{
     1210  owl_fmtext fm;
     1211  FILE *file;
     1212  char buff[1024];
     1213
     1214  file=fopen(filename, "r");
     1215  if (!file) {
     1216    owl_function_error("Could not open file: %s", filename);
     1217    return;
     1218  }
     1219
     1220  owl_fmtext_init_null(&fm);
     1221  while (fgets(buff, 1024, file)) {
     1222    owl_fmtext_append_normal(&fm, buff);
     1223    owl_fmtext_append_normal(&fm, "\n");
     1224  }
     1225
     1226  owl_function_popless_fmtext(&fm);
     1227  owl_fmtext_free(&fm);
     1228  fclose(file);
    12061229}
    12071230
Note: See TracChangeset for help on using the changeset viewer.