"Fossies" - the Fresh Open Source Software Archive

Member "xcdroast-1.19/src/main.h" (2 Nov 2018, 15643 Bytes) of package /linux/misc/xcdroast-1.19.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "main.h" see the Fossies "Dox" file reference documentation and the latest Fossies "Diffs" side-by-side code changes report: 1.18_vs_1.19.

    1 /*
    2  *  main.h
    3  *
    4  *  external-function-definitions
    5  *  21.10.02 tn@xcdroast.org
    6  *
    7  *
    8  *  Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
    9  *
   10  *  This file is part of xcdroast.
   11  *
   12  *  This program is free software; you can redistribute it and/or modify
   13  *  it under the terms of the GNU General Public License as published by
   14  *  the Free Software Foundation; either version 2 of the License, or
   15  *  (at your option) any later version.
   16  *
   17  *  This program is distributed in the hope that it will be useful,
   18  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
   19  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   20  *  GNU General Public License for more details.
   21  *
   22  *  You should have received a copy of the GNU General Public License
   23  *  along with this program; if not, write to the Free Software
   24  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
   25  */
   26 
   27 
   28 gint check_screensize(gint bigfonts);
   29 gint tbf(gint koord);
   30 
   31 void my_center_dialog(GtkWidget *dialog);
   32 gint show_dialog(gchar *icon_file, gchar *text, gchar *btn1, gchar *btn2, gchar *btn3, gint defbutton); 
   33 void show_about_dialog();
   34 gint show_fancy_dialog(gchar *htext, gchar *ttext, gchar *btn1, gchar *btn2, gint defbutton);
   35 void define_tooltip(GtkWidget *widget, gchar *text);
   36 void clear_sidespace();
   37 void clear_workspace();
   38 void clear_actionspace();
   39 void set_sidebar_width();
   40 gboolean logo_on_expose(GtkWidget *widget, GdkEventExpose *event, cairo_surface_t *img);
   41 GtkWidget *display_logo(cairo_surface_t *logo, gchar *logo_text);
   42 gint init(gint argc, gchar *argv[], gint *altdevscan);
   43 void create_main(gint confignotloaded);
   44 void create_setup();
   45 void create_duplicate();
   46 void create_create();
   47 void set_font_and_color(GtkWidget *widget, gchar *font, gchar *color);
   48 void set_font_and_color_frame(GtkWidget *widget, gchar *font, gchar *color);
   49 void set_labelcolor(GtkWidget *widget, gchar *color);
   50 void set_clist_row_font(GtkCList *clist, gint row, gchar *ffont);
   51 void set_clist_row_color(GtkCList *clist, gint row, gchar *color);
   52 void free_glist(GList **list);
   53 void copy_glist(GList **dst, GList *src);
   54 void del_glist_link(GList **list, gchar *str);
   55 gint check_in_glist(GList **list, gchar *str);
   56 gint check_in_mstr_glist(GList **list, gchar *str);
   57 void del_mstr_glist_link(GList **list, gchar *str, gint del_both);
   58 void add_redir_mstr_glist(GList **list, gchar *str, gchar *new);
   59 void extract_mstr_path_from_clist(gchar *in, gchar *out);
   60 void get_redir_path_from_mstr_glist(GList **list, gchar *str, gchar *ret);
   61 void get_spawn_path(gchar *app, gchar *ret);
   62 
   63 void get_scsi_type_string(gchar *str, gint type, gint removeable);
   64 void scanbus(gint altdevscan);
   65 void scandrivers();
   66 void scancharsets();
   67 void scanoptions(gint write_devnr);
   68 GList *get_dsp_devices();
   69 gchar *gen_mix_from_dspdev(gchar *dsp, gchar *ret);
   70 gchar *get_uname_info(gchar *str);
   71 gint save_setup_config(gchar *confdir, gchar *fname);
   72 gint load_setup_config(gchar *fname, gint rootconf);
   73 void get_cd_toc(gint devnr);
   74 void get_cd_toc_and_volid(gint devnr);
   75 pid_t full_dpl_pipe_shell(gint *out, gint *in, gchar *cmd);
   76 gint query_mixer();
   77 gint set_mixer(gint val);
   78 void kill_readcdda();
   79 gint read_audio_track(gint devnr, gint starttrack, gint endtrack, gint kbyte,
   80                       gchar *fname, gint startoffset, gint endoffset,
   81                       gint nrtracks, gfloat percent, gfloat percent_done,
   82               gint viewtrack);
   83 gint read_data_track(gint devnr, gint starttrack, gint kbyte,                                         gchar *fname, gint startoffset, gint endoffset,
   84                       gint nrtracks, gfloat percent, gfloat percent_done,
   85               gint viewtrack);
   86 gint verify_audio_track(gint devnr, gint starttrack, gint endtrack, gint kbyte,
   87                       gchar *fname, gint startoffset, gint endoffset,
   88                       gint nrtracks, gfloat percent, gfloat percent_done,
   89               gint viewtrack);
   90 gint verify_data_track(gint devnr, gint starttrack, gint kbyte,                                       gchar *fname, gint startoffset, gint endoffset,
   91                       gint nrtracks, gfloat percent, gfloat percent_done,
   92               gint viewtrack);
   93 
   94 void ctree_change_viewmode(gint showfiles, gint showhidden);
   95 void ctree_unselect_all();
   96 void ctree_get_selected(GList **retsel);
   97 void ctree_expand_manualpath(GtkWidget* entry, gchar *altstring);
   98 GtkCTree *create_directory_ctree(gchar *basedir,gchar *title, GtkWidget *win, GtkWidget *entry, gint showfiles, gint showhidden, gint mastermenu);
   99 gint check_iso_file(gint devnr, gchar *isoname, gchar *volid, gint startsec);
  100 gint save_text2file(char *fname, GtkWidget *txt);
  101 gint write_copy_cd_toc_file(gchar *tocfile);
  102 gint read_copy_cd_toc_file(gchar *tocfile);
  103 gint write_inf_file(track_read_param_t *trackparam);
  104 gint get_inf_tracktitle(gchar *path, image_files_t *entry);
  105 void fill_device_info(gint devnr, GtkWidget *txt);
  106 void eject_cd(gint devnr);
  107 void load_cd(gint devnr);
  108 void get_atip_info(gint devnr, GtkWidget *txt);
  109 void get_msinfo_info(gint devnr, gint *nr1, gint *nr2);
  110 void scanblankmodes();
  111 gint read_info_sector_from_file(gchar *isoname, gchar *buf, gint bsize);
  112 gint read_info_sector_from_dev(gint devnr, gchar *buf, gint bsize, gint startsector);
  113 gint start_blanking_process(gint devnr, GtkWidget *text_window);
  114 gint start_bulk_read_action(gint devnr, gfloat percent_done, gint startnr);
  115 gint start_write_action(gint devnr);
  116 gint start_write_onthefly_action(gint read_devnr, gint write_devnr);
  117 gint start_write_fixate_only(gint devnr);
  118 gint start_delete_action(GList *delfiles);
  119 gint start_cddb_lookup_action(gint mode);
  120 gint continue_cddb_lookup_action(gint match);
  121 void test_dspdevice_play();
  122 gint save_isooptions_file(gchar *confdir, gchar *fname);
  123 gint load_isooptions_file(gchar *fname);
  124 gint save_isoheaders_file(gchar *confdir, gchar *fname);
  125 gint load_isoheaders_file(gchar *fname);
  126 gint save_writeoptions_file(gchar *confdir, gchar *fname);
  127 gint load_writeoptions_file(gchar *fname);
  128 
  129 gint get_free_space(gchar *path, gchar *filesystem);
  130 gint convert_devnr2devstring(gint devnr, gchar *str);
  131 gint convert_devnr2vendor(gint devnr, gchar *str);
  132 gint convert_devnr2model(gint devnr, gchar *str);
  133 gint convert_devnr2busid(gint devnr, gchar *str);
  134 gint convert_devnr2busid_dev(gint devnr, gchar *str);
  135 void convert_kbytes2mbminstring(gint kbytes, gchar *str);
  136 void convert_kbytes2mbcorrectminstring(gint kbytes, gchar *str);
  137 void convert_kbytes2mbstring(gint kbytes, gchar *str);
  138 void convert_frames2mbminstring(gint frames, gchar *str);
  139 void convert_sectors2mbminstring(gint frames, gchar *str);
  140 void convert_frames2mbstring(gint frames, gchar *str);
  141 void convert_frames2minstring(gint frames, gchar *str);
  142 gint is_directory(gchar *path);
  143 gint is_not_directory(gchar *path);
  144 gint is_file(gchar *path);
  145 gchar *get_basedir(gchar *dir);
  146 gint is_subdirs(gchar *path);
  147 gint is_subfiles(gchar *path);
  148 void show_dir_tree(gchar *retvalue);
  149 GtkWidget *rightjust_gtk_label_new(gchar *txt);
  150 GtkWidget *leftjust_gtk_label_new(gchar *txt);
  151 void show_file_selector(gchar *title, gint mode, gchar *defname, gchar *retvalue);
  152 gchar *strip_string(gchar *str);
  153 gchar *escape_parse(gchar *str);
  154 gchar *convert_escape(gchar *str);
  155 gchar *convert_escape2(gchar *str);
  156 gchar *convert_escape3(gchar *str);
  157 gint remove_illegal_chars(gchar *str);
  158 void remove_illegal_chars_iconv(gchar *str);
  159 gint decode_title_artist(gchar *str, gchar *title, gchar *artist);
  160 gint show_cddb_query(GtkWidget *cdtext_parent, gint onthefly);
  161 gint scan_imagedirs();
  162 gint determine_disc_type(gchar *type_name, gint mode);
  163 gint determine_free_space(gint *biggestfree);
  164 gint read_line(gint fd, gchar *ptr, gint maxlen);
  165 gint read_io_channel_all(GIOChannel *channel, gchar *ptr, gint maxlen);
  166 gint read_io_channel(GIOChannel *channel, gchar *ptr, gint maxlen);
  167 gint read_line_wait(gint fd, gchar *ptr, gint maxlen);
  168 gint allocate_track_filenames(gint *overwrite, gint *overwritebiggest);
  169 gint scan_for_toc_files();
  170 void print_trackreadset();
  171 gint show_mstr_redir(gchar *dir, gchar *ret);
  172 gint show_and_do_read_tracks(gint devnr, gint bulk);
  173 void show_device_detail(gint devnr);
  174 void display_atip_info(gint devnr);
  175 void wait_and_process_events();
  176 void display_blank_cdrw(gint devnr);
  177 void display_advwriteoptions(gint devnr);
  178 gint check_write_files(gint nosizecheck);
  179 gint show_and_do_write_tracks(gint devnr, gint read_devnr, gint onthefly);
  180 off_t get_size_from_imagelist(gchar *tname);
  181 gint get_type_from_imagelist(gchar *tname);
  182 gint get_tracknr_from_imagelist(gchar *tname);
  183 gint get_discid_from_imagelist(gchar *tname, gchar *ret);
  184 gint get_volname_from_imagelist(gchar *tname, gchar *ret);
  185 image_files_t *get_entry_from_imagelist(gchar *tname);
  186 gint show_and_do_delete(GList *delfiles);
  187 gint show_and_do_verify_tracks(gint devnr);
  188 void show_setup_dsptest();
  189 gint extract_quoted(gchar *str);
  190 gint read_line2(gint fd, gchar *ptr, gint maxlen, gint timeout);
  191 gint writen(gint fd, gchar *ptr, gint nbytes, gint newline);
  192 gint check_wav_file(gchar *wavname);
  193 gchar *check_tilde(gchar *str);
  194 gchar *get_pw_home(gint uid);
  195 gint parse_config_line(gchar *iline, gchar *id, gchar *value);
  196 gint parse_config_line2(gchar *iline, gchar *id, gchar *value, gchar *value2);
  197 gint allocate_master_filename(gint size, gint nr, gchar **return_fname,
  198         gint *overwrite, gint *overwritebiggest);
  199 void sort_glist(GList *filelist);
  200 void sort_int_glist(GList *intlist);
  201 gint show_request_redirect_path(gchar *path, gchar *ret);
  202 gint show_request_redirect_path_multiple(gchar *commonstr, gint nrpaths, gchar *ret);
  203 void wavplay_frontend(GtkWidget *widget);
  204 void wavplay_dodouble();
  205 
  206 off_t is_std_wav_file(int f, off_t *offset);
  207 
  208 void dodebug(gint debuglevel, gchar *fmt, ...);
  209 void dolog(gint loglevel, gchar *fmt, ...);
  210 void dobeep(gint type);
  211 gint verify_loaded_config();
  212 gint check_vrfy_track(gchar *fname);
  213 void assign_trackname(gchar *titlestr, image_files_t *entry);
  214 gint is_on_writelist(gchar *file);
  215 void clear_trackreadset();
  216 
  217 void show_mkisofs_check_output(gint automode,  gint *timeout);
  218 gint fill_mkisofs_check_info(GtkWidget *text_window);
  219 gint show_and_start_master();
  220 gint start_master_action();
  221 gint start_onthefly_master_action(gint write_devnr);
  222 
  223 gint check_version_cdrecord(gchar *match, gchar *found, gint *isProDVD);
  224 gint check_version_mkisofs(gchar *match, gchar *found);
  225 gint check_version_cdda2wav(gchar *match, gchar *found);
  226 gint check_version_readcd(gchar *match, gchar *found);
  227 gint check_version_shell();
  228 gint check_version_wrapper(gchar *tmp);
  229 
  230 gint stat_file(gchar *file);
  231 gint does_support_burnproof(gint devnr);
  232 gint does_support_varirec(gint devnr);
  233 gint does_support_audiomaster(gint devnr);
  234 gint does_support_forcespeed(gint devnr);
  235 gint isroot();
  236 gint check_pw_user(gchar *name);
  237 gint get_file_owner(gchar *path);
  238 gint match_group_name(gid_t gid, gchar *group);
  239 void return_group_name(gid_t gid, gchar *ret);
  240 void return_user_name(uid_t uid, gchar *ret);
  241 gint check_group_exists(gchar *name);
  242 void parse_alt_devs(gchar *str);
  243 gchar *get_wrap_path(gchar *cmd, gchar *ret);
  244 gint get_gracetime();
  245 gint is_dir_writeable(gchar *dir);
  246 gint extract_singlequoted(gchar *str);
  247 void set_sectorsize(gint devnr, gint size);
  248 gint get_sectorsize(gint devnr);
  249 void get_chown_cmd(gchar *cmd);
  250 void get_chgrp_cmd(gchar *cmd);
  251 void get_chmod_cmd(gchar *cmd);
  252 
  253 gint simple_exec(gchar *line);
  254 void add_to_nonrootvalues(GList **list, gchar *path, gint uid, gint gid, gint mode);
  255 void free_nonrootvalues(GList **list);
  256 
  257 void edit_cdtext_clicked(GtkWidget *widget, gpointer data);
  258 void switch_artist_title(gchar *dtitle);
  259 void get_artist_and_title_from_cddb(gchar *dtitle, gchar *artist, gchar *title);
  260 void get_title_artist_from_xinf(gchar *file, gchar *artist, gchar *title);
  261 void fill_cdlist();
  262 gint show_edit_cdtext(gint mode, GtkWidget *writetoc_menu);
  263 void cdtext_set_dtitle(gchar *dtitle);
  264 void cdtext_set_ttitle(gchar *ttitle, gint nr);
  265 void edit_xinf_for_cd_text(gchar *trackfile, gchar *tocfile);
  266 gint move_textfile(gchar *src, gchar *target);
  267 void edit_title_artist_in_toc_file(gchar *tocfile, gchar *title, gchar *artist);
  268 void edit_title_artist_in_xinf_file(gchar *trackfile, gchar *title, gchar *artist);
  269 gint create_tmp_writetracks_tocfile(gchar *tocfile);
  270 void generate_tmp_tocfile_name(gchar *tocfile);
  271 void get_cdtitle_from_tmp_tocfile(gchar *tocfile, gchar *cdtitle);
  272 void fill_write_tracks();
  273 void fill_writelist2(GtkCList *llist, GtkWidget *lentry);
  274 void redraw_writelist(GtkCList *llist, GtkWidget *lentry);
  275 void clear_mstr_glist(GList **list);
  276 gint save_master_list(gchar *fname);
  277 gint load_master_list(gchar *fname);
  278 void generate_tmp_file_name(gchar *ext, gchar *file1);
  279 gint write_empty_file(gchar *fname);
  280 gint write_inf_file_for_master(gchar *fname, gint tracknr);
  281 void get_msinfo_from_imagelist(gchar *tname, gint *nr1, gint *nr2);
  282 gint is_a_sony(gint devnr);
  283 gint check_islink(gchar *file, gchar *link);
  284 gint compare_versions(gchar *gotversion, gchar *minimal_version);
  285 void get_common_path_component(GList *dirs, gchar *common);
  286 gint show_mstr_redir_multi(gchar *commondir, gint nrpaths, gchar *ret);
  287 void get_subheader(gchar *buf, gchar *text, gint start, gint end);
  288 gint do_driveropts(gchar *out, gint devnr);
  289 void remove_tmp_xcdr_files();
  290 void remove_master_dir_by_drag(GList *sel);
  291 gchar *url_encode(gchar *s, gint len, gint *new_length);
  292 gint extract_single_drag_filename(gchar *dragtext, gint draglen, gchar *rettext);
  293 gint extract_glist_drag_filenames(gchar *dragtext, gint draglen, gchar *match, GList **dst);
  294 gint create_device_scanning(gint scanparam, gint manual, gint withlogo, gchar *devicestr);
  295 void scanbus_new(GtkWidget *txt, gint scanparam);
  296 void scanbus_new_single(gchar *devstr, GtkWidget *txt);
  297 gint get_writerreaderdevs_index(gint devnr);
  298 gint writemode_supported(gint mode, gint devnr);
  299 void free_writerreader_data();
  300 void preselect_write_mode_menu(GtkWidget *omenu, gint devnr);
  301 gint show_add_manual_device(gchar *newdev);
  302 void remove_from_writerreader_data(gint devnr);
  303 gint get_last_writerreaderdevs_index();
  304 void store_win_geometry(GtkWidget *win);
  305 gint set_win_geometry(GtkWidget *win);
  306 void set_xcdr_title(GtkWidget *dialog, GtkWidget *dialog2, gint val);
  307 gint run_sudo_command(gchar *cmd);
  308 void scanbus_rscsi(gchar *devstr, GtkWidget *txt);
  309 gint get_writerreaderdevs_index_from_devstr(gchar *devstr);
  310 gint check_valid_isrc_mcn(gchar *tname);
  311 gint verify_mcn(gchar *mcn);
  312 gint verify_isrc(gchar *isrc);
  313 gint clear_isrc_mcn_from_tracks();
  314 gint clear_isrc_mcn_from_inffile(gchar *tname);
  315 gchar *get_reducedpath(gchar *dir, gchar *out);
  316 gint charset_convert_to_latin1(gchar *str, gchar *out);
  317 gint charset_convert_to_utf8(gchar *str, gchar *out);
  318 gchar *get_purefile(gchar *dir, gchar *out);
  319 gchar *return_media_type(gint devnr);
  320 void getmodesflags(gchar *dev, gchar *drvflags, gchar *drvmodes);
  321 void generate_tmp_prefix_name(gchar *tmpprefix); 
  322 gchar *pleaseinsertmedia();
  323 gint is_dvdwriter(gint devnr);
  324 GtkWidget *show_dialog_wait(gchar *icon_file, gchar *ttext);
  325 void show_dialog_wait_remove(GtkWidget *dialog);
  326 GtkWidget *my_gtk_dialog_new();
  327 gchar *convert_for_gtk2(gchar *str);
  328 gchar *convert_for_gtk2_filename(gchar *str);
  329 gchar *lookup_stock_icon(gchar *icon);
  330 gint exec_sudo(gchar *cmd);
  331 void append_to_text_view(GtkWidget *txt, gchar *tmp);
  332 void append_to_text_view_bold(GtkWidget *txt, gchar *tmp);
  333 void append_to_text_view_color(GtkWidget *txt, gchar *tmp, gchar *color);
  334 void set_dialog_disallow_delete();
  335 void set_dialog_allow_delete();
  336 gboolean get_dialog_delete_pressed();
  337 void clear_dialog_delete_pressed();
  338 void cancel_show_dialog();
  339 void set_wm_icon();
  340 void append_multiline_to_textview(gchar *str, gchar *trimstr, GtkWidget *txt, gchar *debugcmd);