123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
/*---------------------------------------------------------------------------* * * BinkleyTerm * * (C) Copyright 1987-96, Bit Bucket Software Co. * For license and contact information see /doc/orig_260/license.260. * * This version was modified by the BinkleyTerm XE Team. * For contact information see /doc/team.lst and /doc/join.us. * For a complete list of changes see /doc/xe_user.doc and /doc/xe_hist.doc. * * Filename : $Source: /cvsroot/btxe/btnt/sources/banner.cpp,v $ * Revision : $Revision: 1.1 $ * Tagname : $Name: $ * Last updated: $Date: 2005/01/01 15:18:11 $ * State : $State: Exp $ * * Description : Banner * *---------------------------------------------------------------------------*/ #include "includes.h" void parse_BannerCID (char *par) { char *c; int nobanner = 0; struct SBBSBanner *newbanner; newbanner = (struct SBBSBanner *) malloc (sizeof (struct SBBSBanner)); if (!newbanner) return; BBSBannerCID = (struct SBBSBanner **) realloc (BBSBannerCID, (1 + definedbanners) * sizeof (struct SBBSBanner *)); BBSBannerCID[definedbanners] = newbanner; c = par; while (*c != '\0' && *c != ' ') c++; if (*c == '\0') nobanner = 1; else *c = '\0'; strntcpy (newbanner->phone, par, CID_LENGTH); if (nobanner) newbanner->banner = NULL; else newbanner->banner = ctl_string (c + 1); definedbanners++; } void set_banner (void) { char *c1, *c2; unsigned ct, match; /* TS 970124 signed-> unsigned */ struct SBBSBanner *current; if (CurrentCID == NULL) /* MR 970311 */ { InUseBBSBanner = BBSbanner; return; } for (ct = 0; ct < definedbanners; ct++) { c1 = CurrentCID; current = BBSBannerCID[ct]; c2 = current->phone; match = 1; while (*c1 != '\0' || *c2 != '\0') { if (*c2 == '*') break; if (*c1 != *c2) { match = 0; break; } c1++; c2++; } if (match) { InUseBBSBanner = current->banner; return; } } InUseBBSBanner = BBSbanner; /* No match; use default banner */ } /* $Id: banner.cpp,v 1.1 2005/01/01 15:18:11 vildanov Exp $ */
About Koders | Resources | Downloads | Support | Black Duck | Submit Project | Terms of Service | DMCA | Privacy Policy | Site Map| Contact Us
©2010 Koders is a trademark of Black Duck Software, Inc. Black Duck, Know Your Code and the Black Duck logo are registered trademarks of Black Duck Software, Inc. in the United States and other jurisdictions. All other trademarks are the property of their respective holders.