/* $OpenBSD$ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER
* IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include <sys/types.h>
#include <stdlib.h>
#include <string.h>
#include "tmux.h"
/*
* Based on the description by Paul Williams at:
*
* http://vt100.net/emu/dec_ansi_parser
*
* With the following changes:
*
* - 7-bit only.
*
* - Support for UTF-8.
*
* - OSC (but not APC) may be terminated by \007 as well as ST.
*
* - A state for APC similar to OSC. Some terminals appear to use this to set
* the title.
*
* - A state for the screen \033k...\033\\ sequence to rename a window. This is
* pretty stupid but not supporting it is more trouble than it is worth.
*/
/* Helper functions. */
int input_split(struct input_ctx *);
int input_get(struct input_ctx *, u_int, int, int);
void input_reply(struct input_ctx *, const char *, ...);
/* Transition entry/exit handlers. */
void input_clear(struct input_ctx *);
void input_enter_dcs(struct input_ctx *);
void input_exit_dcs(struct input_ctx *);
void input_enter_osc