X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=misc.h;h=a361d706b45d40fd8c7908a97fb17520c67f7dc3;hb=cc66c86e7311c97db09da989c340ba3108c9e14f;hp=f4363e4412ba507270f836bb4cf448c605a4b376;hpb=3d012d9bd07efebffadcab368c6695f2e295bb21;p=PuTTY.git diff --git a/misc.h b/misc.h index f4363e44..a361d706 100644 --- a/misc.h +++ b/misc.h @@ -1,3 +1,7 @@ +/* + * Header for misc.c. + */ + #ifndef PUTTY_MISC_H #define PUTTY_MISC_H @@ -20,14 +24,27 @@ typedef struct FontSpec FontSpec; unsigned long parse_blocksize(const char *bs); char ctrlparse(char *s, char **next); +size_t host_strcspn(const char *s, const char *set); +char *host_strchr(const char *s, int c); +char *host_strrchr(const char *s, int c); +char *host_strduptrim(const char *s); + char *dupstr(const char *s); char *dupcat(const char *s1, ...); -char *dupprintf(const char *fmt, ...); +char *dupprintf(const char *fmt, ...) +#ifdef __GNUC__ + __attribute__ ((format (printf, 1, 2))) +#endif + ; char *dupvprintf(const char *fmt, va_list ap); +void burnstr(char *string); + +int toint(unsigned); char *fgetline(FILE *fp); void base64_encode_atom(unsigned char *data, int n, char *out); +int base64_decode_atom(char *atom, unsigned char *out); struct bufchain_granule; typedef struct bufchain_tag { @@ -43,8 +60,12 @@ void bufchain_prefix(bufchain *ch, void **data, int *len); void bufchain_consume(bufchain *ch, int len); void bufchain_fetch(bufchain *ch, void *data, int len); +int validate_manual_hostkey(char *key); + struct tm ltime(void); +void smemclr(void *b, size_t len); + /* * Debugging functions. *