view src/libsst.h @ 5552:85210c453a97

Fix performance regression in refactored syntax cache setup. More doc improvements. * syntax.h (enum syntax_source): New. Specify whether syntax is from property or buffer. (struct syntax_cache): Use enum syntax_source source, instead of no_syntax_table_prop and use_code. Improve comments. (SOURCE_IS_TABLE): New predicate. (SYNTAX_CODE_FROM_CACHE): Use it instead of use_code, and adjust logic. * syntax.c (syntax_cache_table_was_changed): Check cache->source (cache->no_syntax_table_prop is gone). (reset_syntax_cache_range): All information about OBJECT and BUFFER is in CACHE already. Also reset markers in OBJECT if it is a buffer. Rename INFINITE to VALID_EVERYWHERE. (init_syntax_cache): Initialize source (cache->no_syntax_table_prop is gone). Maybe initialize start and end to null markers. Initialize cache range with reset_syntax_cache_range. (update_syntax_cache): Use source instead of no_syntax_table_prop and use_code. (setup_syntax_cache): Add header comment. Improve other comments. Make calls to reset_syntax_cache_range and init_syntax_cache match their prototypes. (init_buffer_syntax_cache): Use init_syntax_cache to do the work. (signal_syntax_cache_extent_changed): Make call to reset_syntax_cache_range match its prototype. Improve local variable naming.
author Stephen J. Turnbull <stephen@xemacs.org>
date Tue, 23 Aug 2011 04:41:45 +0900
parents aa5ed11f473b
children
line wrap: on
line source

/* libsst.h - include file for SPARC sound tools library
**
** Copyright (C) 1989 by Jef Poskanzer.
**
** Permission to use, copy, modify, and distribute this software and its
** documentation for any purpose and without fee is hereby granted, provided
** that the above copyright notice appear in all copies and that both that
** copyright notice and this permission notice appear in supporting
** documentation.  This software is provided "as is" without express or
** implied warranty.
*/

/* Synched up with: Not in FSF. */

/* This file Mule-ized by Ben Wing, 5-15-01. */

#ifndef INCLUDED_libsst_h_
#define INCLUDED_libsst_h_

#include <sys/ioctl.h>
#define AUDIO_4_0_3_COMPAT
#define AUDIO_CHIP
#define AMD_CHIP               /* SparcStation 1, 2, IPC, and IPX */
#include <sbusdev/audio_79C30.h>
#include <multimedia/libaudio.h>
#include <multimedia/audio_device.h>
#include <sun/audioio.h>

#define SAMPLES_PER_SECOND 8192

int sst_open( );
void sst_close( /* int fd */ );

void sst_set_ger( /* int fd, value */ );
void sst_set_gr( /* int fd, value */ );
void sst_set_gx( /* int fd, value */ );

void sst_tones( /* int fd, dhz1, dhz2, thz, rhz, usec */ );
void sst_dtmf( /* int fd, char *dial, int usecper, usecpause */ );

#endif /* INCLUDED_libsst_h_ */