2009-01-26 19:21:29 +00:00
|
|
|
/* this is the development directory for
|
|
|
|
* psyc 1.0.
|
|
|
|
*
|
|
|
|
* the entire net/speck directory has to go
|
|
|
|
* when net/psyc stops being 0.9 and starts
|
|
|
|
* being 1.0.
|
|
|
|
*
|
|
|
|
* please try to make changes by #ifdef SPYC
|
|
|
|
* where possible, only do a plugin replacement
|
|
|
|
* of parse.i
|
|
|
|
*
|
|
|
|
* why do we need this directory? let me explain:
|
|
|
|
* if old and new psyc are to co-exist, we need
|
|
|
|
* differing path names for objects to assign
|
|
|
|
* to the differing ports. even if we merge the
|
|
|
|
* parsers and make them coexist by detecting the
|
|
|
|
* first incoming byte, then we still need a way
|
|
|
|
* to distinguish outgoing PSYC and SPYC.
|
|
|
|
* also, merging the two parsers is not likely or
|
|
|
|
* useful - they are so totally different in
|
|
|
|
* structure - but we can exec the proper ones
|
|
|
|
* from psyclpc or internally, after looking at
|
|
|
|
* the first byte.
|
|
|
|
*/
|
|
|
|
|
2011-05-23 11:02:04 +00:00
|
|
|
#ifndef SPYC
|
2011-05-22 23:33:12 +00:00
|
|
|
#define SPYC
|
2011-05-19 15:41:48 +00:00
|
|
|
|
2011-05-22 23:33:12 +00:00
|
|
|
#include <psyc.h>
|
2011-05-19 15:41:48 +00:00
|
|
|
|
2011-05-22 23:33:12 +00:00
|
|
|
#if __EFUN_DEFINED__(psyc_parse)
|
|
|
|
# define LIBPSYC
|
|
|
|
# include <sys/libpsyc.h>
|
|
|
|
#endif
|
2009-01-26 19:21:29 +00:00
|
|
|
|
|
|
|
#define PSYCPARSE_STATE_HEADER 0
|
|
|
|
#define PSYCPARSE_STATE_CONTENT 1
|
|
|
|
#define PSYCPARSE_STATE_BLOCKED 2
|
|
|
|
#define PSYCPARSE_STATE_GREET 3
|
|
|
|
|
2009-01-26 20:12:53 +00:00
|
|
|
#define DISPATCHERROR(reason) { \
|
2016-08-20 12:47:40 +00:00
|
|
|
debug_message("SPYC DISPATCH ERROR: " reason "\n"); \
|
2009-01-26 20:12:53 +00:00
|
|
|
croak("_error_dispatch", "dispatch error: " \
|
|
|
|
reason); \
|
|
|
|
return; \
|
|
|
|
}
|
|
|
|
|
2011-05-23 11:02:04 +00:00
|
|
|
#endif // SPYC
|