Changeset a352335c for functions.c


Ignore:
Timestamp:
Jul 5, 2003, 7:38:16 AM (18 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:
6873455
Parents:
c045455
Message:
Fixed bug in buddy idle time stuff
File:
1 edited

Legend:

Unmodified
Added
Removed
  • functions.c

    r3ba3af0 ra352335c  
    16841684  time_t start;
    16851685  int up, days, hours, minutes;
     1686  owl_fmtext fm;
     1687
     1688  owl_fmtext_init_null(&fm);
    16861689
    16871690  start=owl_global_get_starttime(&g);
    16881691
    1689   sprintf(buff, "Version: %s\n", OWL_VERSION_STRING);
    1690   sprintf(buff, "%sScreen size: %i lines, %i columns\n", buff, owl_global_get_lines(&g), owl_global_get_cols(&g));
    1691   sprintf(buff, "%sStartup Arugments: %s\n", buff, owl_global_get_startupargs(&g));
    1692   sprintf(buff, "%sStartup Time: %s", buff, ctime(&start));
     1692  owl_fmtext_append_normal(&fm, "Version: ");
     1693  owl_fmtext_append_normal(&fm, OWL_VERSION_STRING);
     1694  owl_fmtext_append_normal(&fm, "\n");
     1695
     1696  sprintf(buff, "Screen size: %i lines, %i columns\n", owl_global_get_lines(&g), owl_global_get_cols(&g));
     1697  owl_fmtext_append_normal(&fm, buff);
     1698
     1699  owl_fmtext_append_normal(&fm, "Startup Arugments: ");
     1700  owl_fmtext_append_normal(&fm, owl_global_get_startupargs(&g));
     1701  owl_fmtext_append_normal(&fm, "\n");
     1702  sprintf(buff, "Startup Time: %s", ctime(&start));
     1703  owl_fmtext_append_normal(&fm, buff);
     1704 
    16931705
    16941706  up=owl_global_get_runtime(&g);
     
    16991711  minutes=up/60;
    17001712  up-=minutes*60;
    1701   sprintf(buff, "%sRun Time: %i days %2.2i:%2.2i:%2.2i\n", buff, days, hours, minutes, up);
     1713  sprintf(buff, "Run Time: %i days %2.2i:%2.2i:%2.2i\n", days, hours, minutes, up);
     1714  owl_fmtext_append_normal(&fm, buff);
    17021715
    17031716  if (owl_global_get_hascolors(&g)) {
    1704     sprintf(buff, "%sColor: Yes, %i color pairs.\n", buff, owl_global_get_colorpairs(&g));
     1717    sprintf(buff, "Color: Yes, %i color pairs.\n", owl_global_get_colorpairs(&g));
    17051718  } else {
    1706     strcat(buff, "Color: No.\n");
    1707   }
    1708 
     1719    sprintf(buff, "Color: No.\n");
     1720  }
     1721  owl_fmtext_append_normal(&fm, buff);
     1722
     1723  /*
    17091724  sprintf(buff, "%sMemory Malloced: %i\n", buff, owl_global_get_malloced(&g));
    17101725  sprintf(buff, "%sMemory Freed: %i\n", buff, owl_global_get_freed(&g));
    17111726  sprintf(buff, "%sMemory In Use: %i\n", buff, owl_global_get_meminuse(&g));
    1712 
    1713   owl_function_popless_text(buff);
     1727  */
     1728
     1729  owl_fmtext_append_normal(&fm, "\n");
     1730  if (owl_global_is_aimloggedin(&g)) {
     1731    owl_fmtext_append_normal(&fm, "AIM: logged in as ");
     1732    owl_fmtext_append_normal(&fm, owl_global_get_aim_screenname(&g));
     1733    owl_fmtext_append_normal(&fm, "\n");
     1734  } else {
     1735    owl_fmtext_append_normal(&fm, "AIM: not logged in\n");
     1736  }
     1737  if (owl_global_is_doaimevents(&g)) {
     1738    owl_fmtext_append_normal(&fm, "AIM: processing events\n ");
     1739  } else {
     1740    owl_fmtext_append_normal(&fm, "AIM: not processing events\n ");
     1741  }
     1742
     1743  owl_function_popless_fmtext(&fm);
     1744  owl_fmtext_free(&fm);
    17141745}
    17151746
Note: See TracChangeset for help on using the changeset viewer.