@@ -792,9 +792,9 @@ static void imap_close_server(struct imap_store *ictx)
792
792
free (imap );
793
793
}
794
794
795
- static void imap_close_store (struct store * ctx )
795
+ static void imap_close_store (struct imap_store * ctx )
796
796
{
797
- imap_close_server (( struct imap_store * ) ctx );
797
+ imap_close_server (ctx );
798
798
free (ctx );
799
799
}
800
800
@@ -879,7 +879,7 @@ static int auth_cram_md5(struct imap_store *ctx, struct imap_cmd *cmd, const cha
879
879
return 0 ;
880
880
}
881
881
882
- static struct store * imap_open_store (struct imap_server_conf * srvc )
882
+ static struct imap_store * imap_open_store (struct imap_server_conf * srvc )
883
883
{
884
884
struct imap_store * ctx ;
885
885
struct imap * imap ;
@@ -1089,10 +1089,10 @@ static struct store *imap_open_store(struct imap_server_conf *srvc)
1089
1089
} /* !preauth */
1090
1090
1091
1091
ctx -> prefix = "" ;
1092
- return ( struct store * ) ctx ;
1092
+ return ctx ;
1093
1093
1094
1094
bail :
1095
- imap_close_store (& ctx -> gen );
1095
+ imap_close_store (ctx );
1096
1096
return NULL ;
1097
1097
}
1098
1098
@@ -1138,9 +1138,8 @@ static void lf_to_crlf(struct strbuf *msg)
1138
1138
* Store msg to IMAP. Also detach and free the data from msg->data,
1139
1139
* leaving msg->data empty.
1140
1140
*/
1141
- static int imap_store_msg (struct store * gctx , struct strbuf * msg )
1141
+ static int imap_store_msg (struct imap_store * ctx , struct strbuf * msg )
1142
1142
{
1143
- struct imap_store * ctx = (struct imap_store * )gctx ;
1144
1143
struct imap * imap = ctx -> imap ;
1145
1144
struct imap_cmd_cb cb ;
1146
1145
const char * prefix , * box ;
@@ -1152,7 +1151,7 @@ static int imap_store_msg(struct store *gctx, struct strbuf *msg)
1152
1151
cb .dlen = msg -> len ;
1153
1152
cb .data = strbuf_detach (msg , NULL );
1154
1153
1155
- box = gctx -> name ;
1154
+ box = ctx -> gen . name ;
1156
1155
prefix = !strcmp (box , "INBOX" ) ? "" : ctx -> prefix ;
1157
1156
cb .create = 0 ;
1158
1157
ret = imap_exec_m (ctx , & cb , "APPEND \"%s%s\" " , prefix , box );
@@ -1308,7 +1307,7 @@ int main(int argc, char **argv)
1308
1307
{
1309
1308
struct strbuf all_msgs = STRBUF_INIT ;
1310
1309
struct strbuf msg = STRBUF_INIT ;
1311
- struct store * ctx = NULL ;
1310
+ struct imap_store * ctx = NULL ;
1312
1311
int ofs = 0 ;
1313
1312
int r ;
1314
1313
int total , n = 0 ;
@@ -1364,7 +1363,7 @@ int main(int argc, char **argv)
1364
1363
}
1365
1364
1366
1365
fprintf (stderr , "sending %d message%s\n" , total , (total != 1 ) ? "s" : "" );
1367
- ctx -> name = imap_folder ;
1366
+ ctx -> gen . name = imap_folder ;
1368
1367
while (1 ) {
1369
1368
unsigned percent = n * 100 / total ;
1370
1369
0 commit comments