ffs_opts->bsize= -1; ffs_opts->fsize= -1; ffs_opts->cpg= -1; ffs_opts->density= -1; ffs_opts->minfree= -1; ffs_opts->optimization= -1; ffs_opts->maxcontig= -1; ffs_opts->maxbpg= -1; ffs_opts->avgfilesize= -1; ffs_opts->avgfpdir= -1; ffs_opts->version = 1; ffs_opts->softupdates = 0; fsopts->fs_specific = ffs_opts; fsopts->fs_options = copy_opts(ffs_options); } void ffs_cleanup_opts(fsinfo_t *fsopts) { free(fsopts->fs_specific); free(fsopts->fs_options); } int ffs_parse_opts(const char *option, fsinfo_t *fsopts) { ffs_opt_t *ffs_opts = fsopts->fs_specific; option_t *ffs_options = fsopts->fs_options; char buf[1024];
void fz_pcl_preset(fz_context *ctx, fz_pcl_options *opts, const char *preset) { if (preset == NULL || *preset == 0 || !strcmp(preset, "ljet4")) copy_opts(opts, &fz_pcl_options_ljet4); else if (!strcmp(preset, "dj500")) copy_opts(opts, &fz_pcl_options_dj500); else if (!strcmp(preset, "fs600")) copy_opts(opts, &fz_pcl_options_fs600); else if (!strcmp(preset, "lj")) copy_opts(opts, &fz_pcl_options_lj); else if (!strcmp(preset, "lj2")) copy_opts(opts, &fz_pcl_options_lj2); else if (!strcmp(preset, "lj3")) copy_opts(opts, &fz_pcl_options_lj3); else if (!strcmp(preset, "lj3d")) copy_opts(opts, &fz_pcl_options_lj3d); else if (!strcmp(preset, "lj4")) copy_opts(opts, &fz_pcl_options_lj4); else if (!strcmp(preset, "lj4pl")) copy_opts(opts, &fz_pcl_options_lj4pl); else if (!strcmp(preset, "lj4d")) copy_opts(opts, &fz_pcl_options_lj4d); else if (!strcmp(preset, "lp2563b")) copy_opts(opts, &fz_pcl_options_lp2563b); else if (!strcmp(preset, "oce9050")) copy_opts(opts, &fz_pcl_options_oce9050); else fz_throw(ctx, FZ_ERROR_GENERIC, "Unknown preset '%s'", preset); }
(sizeof(_type) == 2 ? OPT_INT16 : \ (sizeof(_type) == 4 ? OPT_INT32 : OPT_INT64)))), \ .value = &msdos_opt->_name, \ .minimum = _min, \ .maximum = sizeof(_type) == 1 ? 0xff : \ (sizeof(_type) == 2 ? 0xffff : \ (sizeof(_type) == 4 ? 0xffffffff : 0xffffffffffffffffLL)), \ .desc = _desc, \ }, ALLOPTS #undef AOPT { .name = NULL } }; fsopts->fs_specific = msdos_opt; fsopts->fs_options = copy_opts(msdos_options); } void msdos_cleanup_opts(fsinfo_t *fsopts) { free(fsopts->fs_specific); free(fsopts->fs_options); } int msdos_parse_opts(const char *option, fsinfo_t *fsopts) { struct msdos_options *msdos_opt = fsopts->fs_specific; option_t *msdos_options = fsopts->fs_options;