Пример #1
0
struct lp_list *
marshal_g4_idx_ent(struct idx_ent *e, 
		   struct idx *idx, 
		   struct track *track,
		   struct lp_list *l) 
{
  int i;
  struct lp_value *v;
  char *ctstr; // child type
  int coffset; // offset of child in its array

  printf("%s() lbn %d alen %f off %f\n", __func__, e->lbn,
	 dm_angle_itod(e->alen), dm_angle_itod(e->off));

  v = lp_new_intv(e->lbn);
  lp_list_add(l, v);
  v = lp_new_intv(e->cyl);
  lp_list_add(l, v);
  v = lp_new_doublev(dm_angle_itod(e->off));
  lp_list_add(l, v);

  v = lp_new_intv(e->len);
  lp_list_add(l, v);
  v = lp_new_intv(e->cyllen);
  lp_list_add(l, v);
  v = lp_new_doublev(dm_angle_itod(e->alen));
  lp_list_add(l, v);

  v = lp_new_intv(e->runlen);
  lp_list_add(l, v);
  v = lp_new_intv(e->cylrunlen);
  lp_list_add(l, v);

  switch(e->childtype) {
  case IDX:
    ctstr = "IDX";
    coffset = aoffset(idx, e->child.i, sizeof(*e->child.i));
    break;
  case TRACK:
    ctstr = "TRACK";
    coffset = aoffset(track, e->child.t, sizeof(*e->child.t));
    break;
  default: ddbg_assert(0); break;
  }

  v = lp_new_stringv(ctstr);
  lp_list_add(l, v);

  v = lp_new_intv(coffset);
  lp_list_add(l, v);

  if(e->childtype == TRACK) {
    v = lp_new_intv(e->head);
    lp_list_add(l, v);
  }

  return l;
}
Пример #2
0
    appres.ssl.tls = true;
#endif /*]*/

    /* Let the product set the ones it wants. */
    product_set_appres_defaults();
}

#if defined(_WIN32) /*[*/
# define PR3287_NAME "wpr3287"
#else /*][*/
# define PR3287_NAME "pr3287"
#endif /*]*/

static opt_t base_opts[] = {
#if defined(HAVE_LIBSSL) /*[*/
{ OptAcceptHostname,OPT_STRING,false,ResAcceptHostname,aoffset(ssl.accept_hostname),
    "any|DNS:<name>|IP:<addr>","Host name to accept from server certificate" },
#endif /*]*/
{ OptAplMode,  OPT_BOOLEAN, true,  ResAplMode,   aoffset(apl_mode),
    NULL, "Turn on APL mode" },
#if defined(HAVE_LIBSSL) /*[*/
{ OptCaDir,    OPT_STRING,  false, ResCaDir,     aoffset(ssl.ca_dir),
    "<directory>","OpenSSL CA certificate database directory" },
{ OptCaFile,   OPT_STRING,  false, ResCaFile,    aoffset(ssl.ca_file),
    "<filename>", "OpenSSL CA certificate file" },
#endif /*]*/
#if defined(HAVE_LIBSSL) /*[*/
{ OptCertFile, OPT_STRING,  false, ResCertFile,  aoffset(ssl.cert_file),
    "<filename>", "OpenSSL certificate file" },
{ OptCertFileType,OPT_STRING,false,ResCertFileType,  aoffset(ssl.cert_file_type),
    "pem|asn1",   "OpenSSL certificate file type" },