/* $NetBSD: map.h,v 1.13 2016/05/09 21:46:56 christos Exp $ */ /*- * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. * * This code is derived from software contributed to Berkeley by * Christos Zoulas of Cornell University. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)map.h 8.1 (Berkeley) 6/4/93 */ /* * el.map.h: Editor maps */ #ifndef _h_el_map #define _h_el_map typedef el_action_t (*el_func_t)(EditLine *, wint_t); typedef struct el_bindings_t { /* for the "bind" shell command */ const wchar_t *name; /* function name for bind command */ int func; /* function numeric value */ const wchar_t *description; /* description of function */ } el_bindings_t; typedef struct el_map_t { el_action_t *alt; /* The current alternate key map */ el_action_t *key; /* The current normal key map */ el_action_t *current; /* The keymap we are using */ const el_action_t *emacs; /* The default emacs key map */ const el_action_t *vic; /* The vi command mode key map */ const el_action_t *vii; /* The vi insert mode key map */ int type; /* Emacs or vi */ el_bindings_t *help; /* The help for the editor functions */ el_func_t *func; /* List of available functions */ size_t nfunc; /* The number of functions/help items */ } el_map_t; #define MAP_EMACS 0 #define MAP_VI 1 #define N_KEYS 256 libedit_private int map_bind(EditLine *, int, const wchar_t **); libedit_private int map_init(EditLine *); libedit_private void map_end(EditLine *); libedit_private void map_init_vi(EditLine *); libedit_private void map_init_emacs(EditLine *); libedit_private int map_set_editor(EditLine *, wchar_t *); libedit_private int map_get_editor(EditLine *, const wchar_t **); libedit_private int map_addfunc(EditLine *, const wchar_t *, const wchar_t *, el_func_t); #endif /* _h_el_map */ 2015-08-05rename struct write_info as struct track_info, and the variable name 'wi'mrg 2015-06-21separate the 3 functions midirecord uses from libaudio.a into its ownmrg 2014-12-30add a decode_uint() function.mrg 2013-10-18fix unused variable warningschristos 2013-08-30move most of the header writing code from record.c into wav.c and sun.c.mrg 2011-09-06recognize AUDIO_ENCODING_AC3jmcneill 2011-08-28ANSIfy. Add static. Add __dead.joerg 2009-06-18- add extended WAVE header supportmrg 2008-05-29remove clause #3 from my license where there are no othermrg 2008-05-03Rename MKPRIVATELIB to LIBISPRIVATE, to make it clearer that this islukem 2008-04-28Remove clause 3 and 4 from TNF licensesmartin 2006-10-22missing initializers.christos 2006-05-11variable signed/unsigned cleanup.mrg 2005-12-24__inline__ -> inlineperry 2004-10-30Add (unsigned char) cast to ctype functionsdsl 2004-07-19Fix fencepost errors in the conversion functions (making them a bit more likemycroft 2004-07-01put the __packed__ attribute close to the struct definitiondrochner 2004-05-23Use MKPRIVATELIB=yes instead of providing an empty libinstall:: target andlukem 2004-01-21apply the patch from PR#24127: make audio_wav_parse_hdr() take u_int *mrg 2003-06-23Add NetBSD RCS Ids.agc 2003-04-06Respect the law: Use A-law and mu-law as spellings as far as easily possible.wiz 2002-12-27- decode_int(): always use base 10, so that a time of "1:09" works.mrg 2002-12-08remove some #if 0 debug codemrg 2002-10-13inline the contents of auconv.c into auconv.h. this makes audiorecord(1)mrg 2002-09-18makefile delint. use NETBSDSRCDIR as appropriatelukem 2002-02-10- add a AUDIO_FORMAT_DEFAULT. use it. don't change functionity.mrg 2002-01-25add $NetBSD$mrg 2002-01-15- WARNS=3 (from ross@netbsd.org)mrg 2002-01-15for sun output files, if we have unsigned or little endian data, convertmrg 2002-01-15sun linear encodings are *signed*mrg 2002-01-15- add rudimentary "wav" recording support: don't think it copes withmrg 2002-01-01fix 2001/03/04 change: audio_parse_wav_hdr() returns a signed value.mrg 2001-12-12MKfoo=no -> NOfootv 2001-06-07fix bug in audiorecord -t handling.mrg 2001-03-04Don't play trailing garbage at end of RIFF WAVE (.wav) fileshubertf 2000-12-22de-__P()-ifymrg 2000-12-13libaudio:mrg 2000-06-18remove unused crap.mrg 1999-09-27fix off-by-one error in error message array. add a comment.mrg 1999-09-13Use "NULL" instead of "0" for null pointer.tron 1999-03-30remove duplicate include of <stdio.h>mrg 1999-03-29Only 8-bit data is unsigned in WAVE files.mycroft 1999-03-29.wav files are little endian.mrg 1999-03-27make recording precision/encoding setting sane.mrg 1999-03-27add support to play stdin.mrg 1999-03-26add missing copyrights.mrg 1999-03-26add audiorecord and audioplay tools. audioplay does .au and .wav files. aud...mrg