home *** CD-ROM | disk | FTP | other *** search
/ ftp.ee.lbl.gov / 2014.05.ftp.ee.lbl.gov.tar / ftp.ee.lbl.gov / sst.tar.Z / sst.tar / sst / dial.c < prev    next >
C/C++ Source or Header  |  1990-01-10  |  836b  |  36 lines

  1. /* dial.c - generate DTMF dialing codes on the speaker
  2. **
  3. ** Copyright (C) 1989 by Jef Poskanzer.
  4. **
  5. ** Permission to use, copy, modify, and distribute this software and its
  6. ** documentation for any purpose and without fee is hereby granted, provided
  7. ** that the above copyright notice appear in all copies and that both that
  8. ** copyright notice and this permission notice appear in supporting
  9. ** documentation.  This software is provided "as is" without express or
  10. ** implied warranty.
  11. */
  12.  
  13. #include <stdio.h>
  14. #include <fcntl.h>
  15. #include "libsst.h"
  16.  
  17. main( argc, argv )
  18. int argc;
  19. char *argv[];
  20.     {
  21.     int sst_fd;
  22.  
  23.     if ( argc != 2 )
  24.     {
  25.     fprintf( stderr, "usage:  %s <dialstring>\n", argv[0] );
  26.     exit( 1 );
  27.     }
  28.  
  29.     sst_fd = sst_open( );
  30.  
  31.     sst_dtmf( sst_fd, argv[1], 250000, 30000 );
  32.  
  33.     sst_close( sst_fd );
  34.     exit( 0 );
  35.     }
  36.