mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-05 21:42:47 -05:00
Make lots of generic data parameters into 'void *'.
This is a cleanup I started to notice a need for during the BinarySink work. It removes a lot of faffing about casting things to char * or unsigned char * so that some API will accept them, even though lots of such APIs really take a plain 'block of raw binary data' argument and don't care what C thinks the signedness of that data might be - they may well reinterpret it back and forth internally. So I've tried to arrange for all the function call APIs that ought to have a void * (or const void *) to have one, and those that need to do pointer arithmetic on the parameter internally can cast it back at the top of the function. That saves endless ad-hoc casts at the call sites.
This commit is contained in:
@ -38,7 +38,7 @@ int main(int argc, char **argv)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int from_backend(void *frontend, int is_stderr, const char *data, int len)
|
||||
int from_backend(void *frontend, int is_stderr, const void *data, int len)
|
||||
{ return 0; }
|
||||
|
||||
/* functions required by terminal.c */
|
||||
@ -71,7 +71,7 @@ void set_title(void *frontend, char *t) { }
|
||||
void set_icon(void *frontend, char *t) { }
|
||||
void set_sbar(void *frontend, int a, int b, int c) { }
|
||||
|
||||
void ldisc_send(void *handle, const char *buf, int len, int interactive) {}
|
||||
void ldisc_send(void *handle, const void *buf, int len, int interactive) {}
|
||||
void ldisc_echoedit_update(void *handle) {}
|
||||
Context get_ctx(void *frontend) {
|
||||
static char x;
|
||||
|
Reference in New Issue
Block a user