Changeset 28fa23c


Ignore:
Timestamp:
Feb 11, 2009, 12:20:21 PM (11 years ago)
Author:
Nelson Elhage <nelhage@mit.edu>
Branches:
master, debian, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
57609b3
Parents:
1490327
git-author:
Geoffrey Thomas <geofft@mit.edu> (02/07/09 22:16:59)
git-committer:
Nelson Elhage <nelhage@mit.edu> (02/11/09 12:20:21)
Message:
main: Avoid using strcpy/strcat/sprintf in the intro message
File:
1 edited

Legend:

Unmodified
Added
Removed
  • owl.c

    re8c6d8f r28fa23c  
    4646  int newmsgs, nexttimediff;
    4747  struct sigaction sigact;
    48   char *configfile, *tty, *perlout, *perlerr, **argvsave, buff[LINE], startupmsg[LINE];
     48  char *configfile, *tty, *perlout, *perlerr, **argvsave;
    4949  char *confdir;
    5050  owl_filter *f;
     
    321321  /* welcome message */
    322322  owl_function_debugmsg("startup: creating splash message");
    323   strcpy(startupmsg, "-----------------------------------------------------------------------\n");
    324   sprintf(buff,      "Welcome to barnowl version %s.  Press 'h' for on-line help.            \n", OWL_VERSION_STRING);
    325   strcat(startupmsg, buff);
    326   strcat(startupmsg, "To see a quick introduction, type ':show quickstart'.                  \n");
    327   strcat(startupmsg, "                                                                       \n");
    328   strcat(startupmsg, "BarnOwl is free software. Type ':show license' for more                \n");
    329   strcat(startupmsg, "information.                                                     ^ ^   \n");
    330   strcat(startupmsg, "                                                                 OvO   \n");
    331   strcat(startupmsg, "Please report any bugs or suggestions to bug-barnowl@mit.edu    (   )  \n");
    332   strcat(startupmsg, "-----------------------------------------------------------------m-m---\n");
    333   owl_function_adminmsg("", startupmsg);
     323  owl_function_adminmsg("",
     324    "-----------------------------------------------------------------------\n"
     325    "Welcome to barnowl version " OWL_VERSION_STRING ".  Press 'h' for on-line help.\n"
     326    "To see a quick introduction, type ':show quickstart'.                  \n"
     327    "                                                                       \n"
     328    "BarnOwl is free software. Type ':show license' for more                \n"
     329    "information.                                                     ^ ^   \n"
     330    "                                                                 OvO   \n"
     331    "Please report any bugs or suggestions to bug-barnowl@mit.edu    (   )  \n"
     332    "-----------------------------------------------------------------m-m---\n"
     333  );
    334334  sepbar(NULL);
    335335
Note: See TracChangeset for help on using the changeset viewer.