X-Git-Url: https://git.cworth.org/git?p=ttt;a=blobdiff_plain;f=src%2Fttt-error.h;fp=src%2Fttt-error.h;h=a800ea6b8e512ddd62b4e32a6c6943ba493fc9dd;hp=0000000000000000000000000000000000000000;hb=907321c065fb1383e800f0794981df91d4327f57;hpb=15672ac8305a1c5ba0d9bf6edabb0a194c30628e diff --git a/src/ttt-error.h b/src/ttt-error.h new file mode 100644 index 0000000..a800ea6 --- /dev/null +++ b/src/ttt-error.h @@ -0,0 +1,44 @@ +/* ttt-error.c - errors returned to clients + * + * Copyright © 2005 Carl Worth + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * Author: Carl Worth + */ + +#include "ttt.h" + +#ifndef _TTT_ERROR_H_ +#define _TTT_ERROR_H_ + +typedef enum { + TTT_ERROR_NONE, + TTT_ERROR_NONAMESET, + TTT_ERROR_INVALIDNAME, + TTT_ERROR_COMMAND, + TTT_ERROR_SYNTAX, + TTT_ERROR_NOTNUMBER, + TTT_ERROR_NOTGRID, + TTT_ERROR_NOUSER, + TTT_ERROR_NOTINGAME, + TTT_ERROR_NOTPLAYING, + TTT_ERROR_NOTYOURTURN +} ttt_error_t; + +const char * +ttt_error_string (ttt_error_t error); + +#endif /* _TTT_ERROR_H_ */