int main (int argc, char *argv[]) { int res; char *progname = argv[0]; if (argc >= 2 && argv[1] != NULL && 0 == strcmp (argv[1], "--hex")) { dump_as_hex = TRUE; argv++; argc--; } if (argc < 2) { fprintf (stderr, "Usage: %s [--hex] file stream stream ...\n\n", progname); fprintf (stderr, "For example, \"%s X A B C\" dumps the streem C " "from directory A/B from file X.\n", progname); return 1; } gsf_init (); res = test (argc, argv); gsf_shutdown (); return res; }
int main(int argc, char *argv[]) { char *uri = argv[1]; GsfDocMetaData *meta_data; GsfDocProp *prop; const GValue *value; const char *tmp; gsf_init(); meta_data = props_data_read(uri, NULL); prop = gsf_doc_meta_data_lookup(meta_data, GSF_META_NAME_TITLE); if (prop) { value = gsf_doc_prop_get_val(prop); tmp = g_value_get_string(value); fprintf(stderr, "str: %s\n", tmp); } g_object_unref(meta_data); gsf_shutdown(); exit(0); }
/* Decompress the iwb file; it is a zip file. */ static void decompress_iwb (gchar *iwbfile, gchar *project_tmp_dir) { GError *err = (GError *) NULL; GsfInput *input = (GsfInput *) NULL; GsfInfile *infile = (GsfInfile *) NULL; gsf_init (); input = gsf_input_stdio_new (iwbfile, &err); infile = gsf_infile_zip_new (input, &err); g_object_unref (G_OBJECT (input)); if (infile == NULL) { g_warning ("Error decompressing iwb file %s: %s", iwbfile, err->message); g_error_free (err); return; } decompress_infile (infile, project_tmp_dir); g_object_unref (G_OBJECT (infile)); gsf_shutdown (); }
void OMGSFFinalize(void) { if (_GSFIsInitialized) { gsf_shutdown (); _GSFIsInitialized = 0; } }
int main (int argc, char *argv[]) { int res; gsf_init (); res = test (argc, argv); gsf_shutdown (); return res; }
int main (int argc, char *argv[]) { int res; (void)argc; (void)argv; gsf_init (); res = test_xml_indent (); gsf_shutdown (); return res; }
int main (int argc, char *argv[]) { int res; if (argc != 3) { fprintf (stderr, "%s : inputdir outfile\n", argv [0]); return 1; } gsf_init (); res = test (argv); gsf_shutdown (); return res; }
/** * vips_shutdown: * * Call this to drop caches and close plugins. Run with "--vips-leak" to do * a leak check too. * * You may call VIPS_INIT() many times and vips_shutdown() many times, but you * must not call VIPS_INIT() after vips_shutdown(). In other words, you cannot * stop and restart vips. */ void vips_shutdown( void ) { #ifdef DEBUG printf( "vips_shutdown:\n" ); #endif /*DEBUG*/ vips_cache_drop_all(); im_close_plugins(); /* Mustn't run this more than once. Don't use the VIPS_GATE macro, * since we don't for gate start. */ { static gboolean done = FALSE; if( !done ) vips__thread_gate_stop( "init: main" ); } vips__render_shutdown(); vips_thread_shutdown(); vips__thread_profile_stop(); #ifdef HAVE_GSF gsf_shutdown(); #endif /*HAVE_GSF*/ /* In dev releases, always show leaks. But not more than once, it's * annoying. */ #ifndef DEBUG_LEAK if( vips__leak ) #endif /*DEBUG_LEAK*/ { static gboolean done = FALSE; if( !done ) vips_leak(); done = TRUE; } }
/* Create the iwb file. */ static void create_iwb (gchar *zip_filename, gchar *working_dir, gchar *images_folder, gchar *content_filename) { GError *err = (GError *) NULL; GsfOutfile *gst_outfile = (GsfOutfile *) NULL; GsfOutput *gst_output = (GsfOutput *) NULL; gsf_init (); gst_output = gsf_output_stdio_new (zip_filename, &err); if (gst_output == NULL) { g_warning ("Error saving iwb: %s\n", err->message); g_error_free (err); return; } gst_outfile = gsf_outfile_zip_new (gst_output, &err); if (gst_outfile == NULL) { g_warning ("Error in gsf_outfile_zip_new: %s\n", err->message); g_error_free (err); return; } g_object_unref (G_OBJECT (gst_output)); add_folder_to_gst_outfile (gst_outfile, working_dir, images_folder); add_file_to_gst_outfile (gst_outfile, working_dir, content_filename); gsf_output_close ((GsfOutput *) gst_outfile); g_object_unref (G_OBJECT (gst_outfile)); gsf_shutdown (); }