diff --git a/cfgwriter.c b/cfgwriter.c index 1cff83f..bbc72d9 100644 --- a/cfgwriter.c +++ b/cfgwriter.c @@ -20,7 +20,7 @@ int main() { puts("Check config..."); fp = fopen("cfg.sp", "rb"); if(fp) { - SIMPLE_PB* spb = get_pb(fp); + simple_pb_t* spb = get_pb(fp); memset(&cfg, 0, sizeof(config_t)); memcpy(&cfg, spb->target, sizeof(config_t)); printf("set pwd: %s, sps: %s\n", cfg.pwd, cfg.sps); diff --git a/client.c b/client.c index bbc5564..4ddfbe5 100644 --- a/client.c +++ b/client.c @@ -156,7 +156,7 @@ int main(int argc, char *argv[]) { // usage: ./client cfg.sp host port perror("fopen"); return 1; } - SIMPLE_PB* spb = read_pb_into(fp, (SIMPLE_PB*)buf); + simple_pb_t* spb = read_pb_into(fp, (simple_pb_t*)buf); if(!spb) { fprintf(stderr, "Error reading config file: %s\n", argv[1]); return 2; diff --git a/migratenew.c b/migratenew.c index 5d4f4b9..7cbafc4 100644 --- a/migratenew.c +++ b/migratenew.c @@ -31,7 +31,7 @@ int main(int argc, char** argv) { int ch; while(has_next(old, ch)) { - SIMPLE_PB* spb = get_pb(old); + simple_pb_t* spb = get_pb(old); DICTNEW* d; switch(spb->struct_len) { case sizeof(DICTOLD): diff --git a/printall.c b/printall.c index 08dd906..ad1c963 100644 --- a/printall.c +++ b/printall.c @@ -18,7 +18,7 @@ int main(int argc, char** argv) { int ch; while(has_next(f, ch)) { - SIMPLE_PB* spb = read_pb_into(f, (SIMPLE_PB*)buf); + simple_pb_t* spb = read_pb_into(f, (simple_pb_t*)buf); struct dict_t* d; if(!spb) { fputs("Bad spb file", stderr); diff --git a/server.c b/server.c index ddbb9f2..a7bcd66 100644 --- a/server.c +++ b/server.c @@ -223,7 +223,7 @@ static void init_dict_pool(FILE *fp) { int ch; while(has_next(fp, ch)) { if(!ch) continue; // skip null bytes - SIMPLE_PB* spb = read_pb_into(fp, (SIMPLE_PB*)buf); + simple_pb_t* spb = read_pb_into(fp, (simple_pb_t*)buf); if(!spb) { fputs("Bad spb file", stderr); exit(EXIT_FAILURE); @@ -308,7 +308,7 @@ static int s1_get(thread_timer_t *timer) { pthread_cleanup_push((void*)&close_dict, (void*)(uintptr_t)timer->index); while(has_next(fp, ch)) { if(!ch) continue; // skip null bytes - SIMPLE_PB* spb = read_pb_into(fp, (SIMPLE_PB*)buf); + simple_pb_t* spb = read_pb_into(fp, (simple_pb_t*)buf); if(!spb) continue; // skip error bytes dict_t* d = (dict_t*)spb->target; if(!strcmp(timer->dat, d->key)) { @@ -338,7 +338,7 @@ static int insert_item(FILE *fp, const dict_t* dict, int keysize, int datasize) uint8_t buf[8+DICTSZ]; while(has_next(fp, ch)) { if(!ch) continue; // skip null bytes - SIMPLE_PB* spb = read_pb_into(fp, (SIMPLE_PB*)buf); + simple_pb_t* spb = read_pb_into(fp, (simple_pb_t*)buf); if(!spb) { fputs("Bad spb file", stderr); pthread_exit(NULL); @@ -475,7 +475,7 @@ static server_ack_t del(FILE *fp, const char* key, int len, char ret[4]) { uint8_t buf[8+DICTSZ]; while(has_next(fp, ch)) { if(!ch) continue; // skip null bytes - SIMPLE_PB* spb = read_pb_into(fp, (SIMPLE_PB*)buf); + simple_pb_t* spb = read_pb_into(fp, (simple_pb_t*)buf); if(!spb) { fputs("Bad spb file", stderr); pthread_exit(NULL); @@ -1009,7 +1009,7 @@ int main(int argc, char *argv[]) { } if(~((uintptr_t)fp)) { uint8_t buf[8+sizeof(config_t)]; - SIMPLE_PB* spb = read_pb_into(fp, (SIMPLE_PB*)buf); + simple_pb_t* spb = read_pb_into(fp, (simple_pb_t*)buf); if(!spb) { fprintf(stderr, "Error reading config file: %s\n", argv[as_daemon?4:3]); return 8;