Index: pcbway.c =================================================================== --- pcbway.c (revision 36832) +++ pcbway.c (revision 36833) @@ -365,6 +365,8 @@ rnd_wget_opts_t wopts = {0}; int n, found, rv; + + /* set up filenames */ if (CFG.debug) { postfile = "POST.txt"; @@ -375,6 +377,7 @@ postfile = rnd_tempfile_name_new("post.txt"); tarname = "gerb.tar"; gerbdir = "gerbcam"; +TODO("Do not hardwire posftile and tarname"); } if (CFG.debug || CFG.verbose) rnd_message(RND_MSG_DEBUG, "pcbway_order: post=%s gerb-pack=%s gerbdir=%s\n", postfile, tarname, gerbdir); @@ -399,11 +402,6 @@ goto error; } - - -TODO("read back the dialog values to config fields"); -TODO("Do not hardwire posftile and tarname"); - /* generate unique content separator */ strcpy(sep, "----pcb-rnd-"); for(s = sep+12; s < sep+sizeof(sep)-1; s++) @@ -463,7 +461,6 @@ fprintf(f, "--%s--\r\n", sep); fclose(f); - fr = rnd_wget_popen(UPLOAD_URL, 0, &wopts); found = 0; if (fr != NULL) { @@ -518,7 +515,20 @@ } } +static pcb_order_field_t *pcbway_dad_wid2field(pcb_order_imp_t *imp, order_ctx_t *octx, int wid) +{ + int n; + pcbway_form_t *form = octx->odata; + for(n = 0; n < form->fields.used; n++) { + pcb_order_field_t *f = form->fields.array[n]; + if (f->wid == wid) + return f; + } + + return NULL; +} + static void pcbway_populate_dad(pcb_order_imp_t *imp, order_ctx_t *octx) { int n; @@ -555,6 +565,7 @@ NULL, pcbway_load_fields, pcbway_free_fields, + pcbway_dad_wid2field, pcbway_populate_dad };