home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / mail / mmdf / mmdf-IIb.43 / lib / table / dm_struct.c < prev    next >
Encoding:
C/C++ Source or Header  |  1986-10-02  |  1.8 KB  |  65 lines

  1. #include "util.h"
  2. #include "mmdf.h"
  3. /*
  4.  *     MULTI-CHANNEL MEMO DISTRIBUTION FACILITY  (MMDF)
  5.  *     
  6.  *
  7.  *     Copyright (C) 1979,1980,1981  University of Delaware
  8.  *     
  9.  *     Department of Electrical Engineering
  10.  *     University of Delaware
  11.  *     Newark, Delaware  19711
  12.  *
  13.  *     Phone:  (302) 738-1163
  14.  *     
  15.  *     
  16.  *     This program module was developed as part of the University
  17.  *     of Delaware's Multi-Channel Memo Distribution Facility (MMDF).
  18.  *     
  19.  *     Acquisition, use, and distribution of this module and its listings
  20.  *     are subject restricted to the terms of a license agreement.
  21.  *     Documents describing systems using this module must cite its source.
  22.  *
  23.  *     The above statements must be retained with all copies of this
  24.  *     program and may not be removed without the consent of the
  25.  *     University of Delaware.
  26.  *     
  27.  *
  28.  *     version  -1    David H. Crocker    March   1979
  29.  *     version   0    David H. Crocker    April   1980
  30.  *     version  v7    David H. Crocker    May     1981
  31.  *     version   1    David H. Crocker    October 1981
  32.  *
  33.  */
  34.  
  35. #include "ch.h"
  36. #include "dm.h"
  37.  
  38. extern LLog *logptr;
  39. extern Domain **dm_list;
  40.  
  41. Domain *dm_nm2struct (name,pos)   /* give pointer to structure for domain  */
  42. char  name[];             /* string name of domain              */
  43. Domain ***pos;
  44. {
  45.     register Domain **dmnptr;
  46.  
  47. #ifdef DEBUG
  48.     ll_log (logptr, LLOGBTR, "dm_nm2struct (%s)", name);
  49. #endif
  50.  
  51.     if (*pos == (Domain **) 0)
  52.     *pos = dm_list;
  53.  
  54.     for (dmnptr = *pos; *dmnptr != (Domain *) 0; dmnptr++)
  55.     if (lexequ (name, (*dmnptr) -> dm_domain))
  56.     {
  57. #ifdef DEBUG
  58.         ll_log (logptr, LLOGFTR, "hit");
  59. #endif
  60.         *pos = dmnptr+1;     /* point to next entry in list        */
  61.         return (*dmnptr);    /* return addr of chan struct entry   */
  62.     }
  63.     return ((Domain *) NOTOK);
  64. }
  65.