home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 2 / 2375 / vtalk.c < prev    next >
Encoding:
C/C++ Source or Header  |  1990-12-28  |  929 b   |  49 lines

  1. /* 
  2.  *   Copyright (c) 1989 Oki Electric Industry Co., Ltd.
  3.  *
  4.  *   This file is part of vtalk.
  5.  *
  6.  *   Permission to use, copy, modify and distribute this program without
  7.  *   fee is grtanted,  provided that  the above  copyright notice appear
  8.  *   in all copies.
  9.  *
  10.  */
  11. /*
  12.  *  vtalk.c    main routione for vtalk
  13.  *
  14.  *  vtalk is a command for 
  15.  *  Voice TALK with the user on another machine.
  16.  *  
  17.  */
  18.  
  19. #include "vtalk.h"
  20.  
  21. main(argc, argv)
  22. int  argc;
  23. char *argv[];
  24. {
  25.     int caller;        /* caller ? receiver flag */
  26.     int audio_fd;
  27.     int status;
  28.  
  29.     void check_args(), open_dsocket(), open_socket();
  30.     void call(), response(), vtalk();
  31.  
  32.     check_args(argc, argv, &caller);
  33.     open_dsocket();
  34.     if((status= call_vtalkd(caller)) != SUCCESS){
  35.         /* not exit or not response or not waiting */
  36.         output_err(status);
  37.         exit(1);
  38.     }
  39.     if(caller)
  40.       call();
  41.     else response();
  42.     audio_fd = device_open();
  43.     set_volume();
  44.  
  45.     vtalk(audio_fd, caller);
  46. }
  47.  
  48.  
  49.