summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2009-06-12 16:49:57 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2009-06-12 16:49:57 +0800
commitff9917405ba44a07abc4622201bbfa78c8b82137 (patch)
tree0da008d1ba37692615d9328950c228c3f2343272 /include
parent4bb43f558058ac73ad1a36d489c9deefc19eb869 (diff)
downloadpttbbs-ff9917405ba44a07abc4622201bbfa78c8b82137.tar
pttbbs-ff9917405ba44a07abc4622201bbfa78c8b82137.tar.gz
pttbbs-ff9917405ba44a07abc4622201bbfa78c8b82137.tar.bz2
pttbbs-ff9917405ba44a07abc4622201bbfa78c8b82137.tar.lz
pttbbs-ff9917405ba44a07abc4622201bbfa78c8b82137.tar.xz
pttbbs-ff9917405ba44a07abc4622201bbfa78c8b82137.tar.zst
pttbbs-ff9917405ba44a07abc4622201bbfa78c8b82137.zip
* make AYT customizable
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4571 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'include')
-rw-r--r--include/cmsys.h17
1 files changed, 10 insertions, 7 deletions
diff --git a/include/cmsys.h b/include/cmsys.h
index 88506039..ae7f6347 100644
--- a/include/cmsys.h
+++ b/include/cmsys.h
@@ -166,21 +166,22 @@ extern void Vector_init(struct Vector *self, const int size);
extern void Vector_init_const(struct Vector *self, char * base, const int length, const int size);
extern void Vector_delete(struct Vector *self);
extern void Vector_clear(struct Vector *self, const int size);
-extern int Vector_length(const struct Vector *self);
+extern int Vector_length(const struct Vector *self);
extern void Vector_resize(struct Vector *self, const int length);
extern void Vector_add(struct Vector *self, const char *name);
extern const char* Vector_get(const struct Vector *self, const int idx);
-extern int Vector_MaxLen(const struct Vector *list, const int offset, const int count);
-extern int Vector_match(const struct Vector *src, struct Vector *dst, const int key, const int pos);
+extern int Vector_MaxLen(const struct Vector *list, const int offset, const int count);
+extern int Vector_match(const struct Vector *src, struct Vector *dst, const int key, const int pos);
extern void Vector_sublist(const struct Vector *src, struct Vector *dst, const char *tag);
-extern int Vector_remove(struct Vector *self, const char *name);
-extern int Vector_search(const struct Vector *self, const char *name);
+extern int Vector_remove(struct Vector *self, const char *name);
+extern int Vector_search(const struct Vector *self, const char *name);
/* telnet.c */
struct TelnetCallback {
void (*write_data) (void *write_arg, int fd, const void *buf, size_t nbytes);
- void (*term_resize) (void *resize_arg, int w, int h);
- void (*update_client_code) (void *cc_arg, unsigned char seq);
+ void (*term_resize) (void *resize_arg,int w, int h);
+ void (*update_client_code) (void *cc_arg, unsigned char seq);
+ void (*send_ayt) (void *ayt_arg, int fd);
};
#define TELNET_IAC_MAXLEN (16)
@@ -201,6 +202,7 @@ struct TelnetCtx {
void *write_arg; // write_data
void *resize_arg; // term_resize
void *cc_arg; // update_client_code
+ void *ayt_arg; // send_ayt
};
typedef struct TelnetCtx TelnetCtx;
@@ -213,6 +215,7 @@ extern void telnet_ctx_send_init_cmds(TelnetCtx *ctx);
extern void telnet_ctx_set_cc_arg (TelnetCtx *ctx, void *cc_arg);
extern void telnet_ctx_set_write_arg (TelnetCtx *ctx, void *cc_arg);
extern void telnet_ctx_set_resize_arg(TelnetCtx *ctx, void *cc_arg);
+extern void telnet_ctx_set_ayt_arg (TelnetCtx *ctx, void *ayt_arg);
extern ssize_t telnet_process (TelnetCtx *ctx, unsigned char *buf, ssize_t size);