home *** CD-ROM | disk | FTP | other *** search
/ ftp.wwiv.com / ftp.wwiv.com.zip / ftp.wwiv.com / pub / MISC / LO241SRV.ZIP / MESSAGE1.C < prev    next >
C/C++ Source or Header  |  1998-05-17  |  2KB  |  69 lines

  1.  
  2. // LoraBBS Version 2.41 Free Edition
  3. // Copyright (C) 1987-98 Marco Maccaferri
  4. //
  5. // This program is free software; you can redistribute it and/or modify
  6. // it under the terms of the GNU General Public License as published by
  7. // the Free Software Foundation; either version 2 of the License, or
  8. // (at your option) any later version.
  9. //
  10. // This program is distributed in the hope that it will be useful,
  11. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13. // GNU General Public License for more details.
  14. //
  15. // You should have received a copy of the GNU General Public License
  16. // along with this program; if not, write to the Free Software
  17. // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  18.  
  19. #include <stdio.h>
  20. #include <string.h>
  21. #include <ctype.h>
  22. #include <stdlib.h>
  23. #include <dir.h>
  24. #include <io.h>
  25. #include <fcntl.h>
  26. #include <ctype.h>
  27.  
  28. #include <cxl\cxlstr.h>
  29.  
  30. #include "lsetup.h"
  31. #include "sched.h"
  32. #include "msgapi.h"
  33. #include "externs.h"
  34. #include "prototyp.h"
  35.  
  36. char *firstchar(char *, char *, int);
  37.  
  38. void gather_origin_netnode (s)
  39. char *s;
  40. {
  41.    int zone, net, node, point;
  42.    char *p;
  43.  
  44.    p = strchr(s, '\0');
  45.  
  46.    while (p != s && !isdigit (*p))
  47.       p--;
  48.  
  49.    while (p > s)
  50.    {
  51.       if (!isdigit(*p) && *p != '.' && *p != ':' && *p != '/')
  52.          break;
  53.       p--;
  54.    }
  55.  
  56.    if (p == s)
  57.       return;
  58.  
  59.    p++;
  60.    parse_netnode (p, &zone, &net, &node, &point);
  61.  
  62.    msg_fzone = zone;
  63.    msg.orig_net = net;
  64.    msg.orig = node;
  65.    msg_fpoint = point;
  66. }
  67.  
  68.  
  69.