"Fossies" - the Fresh Open Source Software Archive

Member "xcdroast-1.19/src/xcdroast.h" (5 Nov 2018, 9202 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 "xcdroast.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  *  xcdroast.h
    3  *  21.10.02 tn@xcdroast.org
    4  *
    5  *
    6  *  Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
    7  *
    8  *  This file is part of xcdroast.
    9  *
   10  *  This program is free software; you can redistribute it and/or modify
   11  *  it under the terms of the GNU General Public License as published by
   12  *  the Free Software Foundation; either version 2 of the License, or
   13  *  (at your option) any later version.
   14  *
   15  *  This program is distributed in the hope that it will be useful,
   16  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
   17  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   18  *  GNU General Public License for more details.
   19  *
   20  *  You should have received a copy of the GNU General Public License
   21  *  along with this program; if not, write to the Free Software
   22  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
   23  */
   24 
   25 #include "config.h"
   26 #include <cairo.h>
   27 
   28 #define XCDROAST_VERSION VERSION 
   29 #define MAXLINE 1024
   30 #define MAXENTRY 256
   31 #define CDDAFRAME 2352
   32 #define DATASECTORSIZE 2048
   33 #define SUNDATASECTORSIZE 512
   34 #define XCDRLOGO "icons/xcdrlogo.png"
   35 #define XCDRLOGO_MIDDLE "icons/xcdrlogo_middle.png"
   36 #define XCDRLOGO_SMALL "icons/xcdrlogo_small.png"
   37 #define XCDRLOGO_ICON "icons/xcdrlogo_icon.png"
   38 #define CDDBLOGO "icons/cddblogo.png"
   39 #define IMG_EXTENSIONS { ".iso", ".raw", ".img", ".wav", ".toc", NULL }
   40 #define CDR_TYPES_MIN { 21, 23, 74, -80, 90, 99, 100, 0 } /* negative value is default */
   41 #define DVD_TYPES_MB { 1460, 2660, 4700, 8540, 0 } /* DVD sizes are declared with decimal prefix */
   42 #define CHARSET_CONVERT_FROM "iso8859-1"    /* CD-Text and default CDDB charset */
   43 #define TMP_XCDR_DIR "/tmp"
   44 #define XCDROAST_INFO_EXT ".xinf"
   45 #define CDDA2WAV_INFO_EXT ".inf"
   46 #define DISPLAY_SIDEBAR_LOGO TRUE
   47 #define DELETE_BLOCKS 50
   48 
   49 /*
   50  * which is base of all filetree-selectors? Set to "$HOME" to have
   51  * this automatically be the home-directory of the current user
   52  *
   53  * #define FILETREEBASE "$HOME" *** currently not used! ***
   54  */
   55 #define FILETREEBASE "/"
   56 
   57 /*
   58  * texts for the write modes
   59  */
   60 #define WRITE_MODES { \
   61     N_("Disc-At-Once (DAO)"), \
   62     N_("Track-At-Once (TAO)"), \
   63     N_("TAO with zero pregap"), \
   64     N_("RAW writing (raw96r)"), \
   65     N_("RAW writing (raw96p)"), \
   66     N_("RAW writing (raw16)"), \
   67     NULL }
   68 
   69 #define HELP_WRITE_MODES { \
   70     N_("Writes a CD in Disc-At-Once mode. This will create an exact copy without any pauses between the tracks. This mode may not work with old CD writers."), \
   71     N_("Writes a CD in Track-At-Once mode. Generates a 2 second pause between each track, but is supported on all writers."), \
   72     N_("Writes a CD in Track-At-Once mode, but eliminates the 2 second pause. This looks very much like DAO, but only works with the following drives: Teac CD-R50S, Teac CD-R55S, JVC XR-W2010, Pinnacle RCD-5020."), \
   73     N_("Writes a CD in RAW writing mode. It will write with 2352 byte sectors plus 96 bytes of raw P-W subchannel data resulting in a sector size of 2448 bytes. This is the preferred raw writing mode as it gives best control over the CD writing process."), \
   74     N_("Writes a CD in RAW writing mode. It will write with 2352 byte sectors plus 96 bytes of packed P-W subchannel data resulting in a sector size of 2448 bytes. This is the less preferred raw writing mode as only a few recordes support it."), \
   75     N_("Writes a CD in RAW writing mode. It will write with 2352 byte sectors plus 16 bytes of P-Q subchannel data resulting in a sector size of 2368 bytes. If a recorder does not support raw96r, this is the preferred raw writing mode. It does not allow to write CD-Text but it is the only raw writing mode in cheap CD writers. As these cheap writers in most cases do not support DAO mode."), \
   76     NULL }
   77 
   78 /*
   79  * texts for the blank modes -
   80  * They are hard coded in cdrecord and must not be changed here!
   81  * We only provide them for the purpose of translation.
   82  */
   83 #define BLANK_MODES { \
   84     N_("blank the entire disk"), \
   85     N_("minimally blank the entire disk (PMA, TOC, pregap)"), \
   86     N_("blank a track"), \
   87     N_("unreserve a track"), \
   88     N_("blank a track tail"), \
   89     N_("unclose last session"), \
   90     N_("blank last session"), \
   91     NULL }
   92 
   93 /*
   94  * texts for the view modes
   95  */
   96 #define VIEW_MODES { \
   97     N_("Small"), \
   98     N_("Normal"), \
   99     N_("Extended"), \
  100     NULL }
  101 
  102 /*
  103  * texts for the "right click"
  104  * context menu in "Master Tracks"
  105  */
  106 #define CONTEXT_MSTRMENU { \
  107     N_("Select all"), \
  108     N_("Unselect all"), \
  109     N_("Load list"), \
  110     N_("Save list"), \
  111     N_("Clear list"), \
  112     NULL }
  113 
  114 /*
  115  * icons for dialogs (borrowed from GNOME)
  116  */
  117 #define ICO_ERROR "icons/dialog_error.png"
  118 #define ICO_INFO "icons/dialog_information.png"
  119 #define ICO_WARN "icons/dialog_warning.png"
  120 #define ICO_QUEST "icons/dialog_question.png"
  121 #define ICO_DEF "icons/dialog_default.png"
  122 
  123 /*
  124  * external called programms
  125  */
  126 #ifndef hpux
  127 # define DF "/bin/df -k" 
  128 # define DF2 "/usr/bin/df -k" 
  129 #else
  130 # define DF "/bin/df -b" 
  131 # define DF2 "/usr/bin/df -b" 
  132 #endif
  133 #define UNAME "/bin/uname -a"
  134 #define UNAME2 "/usr/bin/uname -a"
  135 
  136 #define CHOWNGRPMOD_PATH "/bin:/usr/bin:/sbin:/usr/sbin"
  137 #define CHOWN "chown"
  138 #define CHGRP "chgrp"
  139 #define CHMOD "chmod"
  140 
  141 #define WAVPLAY "bin/wavplay"
  142 #define RMTOOL "bin/rmtool"
  143 #define VRFYTOOL "bin/vrfytool"
  144 #define CDDBTOOL "bin/cddbtool"
  145 #define WRAPPER "bin/xcdrwrap"
  146 
  147 /*
  148  * this paths can be specified relative to lib-dir or absolute
  149  * xcdroast will look for these first in $LIBDIR/ and if not found
  150  * then in $PREFIX (e.g. /usr/bin/cdrecord instead of 
  151  * /usr/local/lib/xcdroast/bin/cdrecord)
  152  */
  153 #define CDRECORD "bin/cdrecord" 
  154 #define CDDA2WAV "bin/cdda2wav"
  155 #define READCD "bin/readcd"
  156 #define MKISOFS "bin/mkisofs"
  157 
  158 /*
  159  * MINIMUM required versions. Greater versions are now silently
  160  * accepted. 
  161  * Distribution-Vendors: DO NOT TOUCH THESE!
  162  * IT WON'T WORK WITH LOWER VERSIONS, EVEN WHEN YOU THINK IT DOES!
  163  */
  164 #define CDRECORD_VERSION "3.02a09"
  165 #define MKISOFS_VERSION "3.02a09"
  166 #define CDDA2WAV_VERSION "3.02a09"
  167 #define READCD_VERSION "3.02a09"
  168 
  169 /*
  170  * Tool to set the wrapper suid bit
  171  */
  172 #define GKSUDO_BINARY "/usr/bin/gksudo"
  173 #define SUDO_BINARY "/usr/bin/sudo"
  174 
  175 #define DSPTESTSOUND "sound/test.wav"   /* demo sound */
  176 
  177 #define MAXDEVICES 128      /* max scanned scsi devices */
  178 
  179 #define MAXDRIVERS 64       /* max support for cdrecord-drivers (as in cdrecord driver=help) */ 
  180 
  181 #define MAXBLANKMODES 16    /* max support for blank-modes (as in cdrecord blank=help) */
  182 
  183 #define MAXCHARSETS 64      /* max support for joliet charsets */
  184 
  185 #define MAXTRACKS 100       /* max tracks a CD can have */
  186 
  187 #define MAXCDDB 100     /* max CDDB matches */
  188 
  189 #define MAXPIPEARGS 1024    /* max args for pipes */
  190 
  191 #define NETIOTIMEOUT 10;    /* timeout in seconds for CDDB queries over network */
  192 
  193 #define IMGFILEPREFIX "track"   /* default image-file-prefix */
  194 
  195 /*
  196  * default filenames for process-output-savefiles
  197  */
  198 #define SAVEOUTCDRECORD "cdrecord.out"
  199 #define SAVEREADTRACKS "readtracks.out"
  200 #define SAVEVERIFYTRACKS "verifytracks.out"
  201 #define SAVEMASTERTRACK "mkisofs.out"
  202 #define SAVEMASTERCALC "mkisofscalc.out"
  203 #define SAVEMASTERLIST "xcdrmaster.lst"
  204 
  205 /*
  206  * default paths / config files
  207  */
  208 #define PREFIX "/usr/local"
  209 #define LIBDIR "lib/xcdroast"
  210 #define CONFIGDIR "~/.config/xcdroast"
  211 #define CONFFILE "xcdroast.cfg"
  212 #define LOGFILE "xcdroast.log"
  213 #define ISOOPTFILE "isoopt.cfg"
  214 #define ISOHEADERFILE "isoheader.cfg"
  215 #define WRITEOPTFILE "writeopt.cfg"
  216 
  217 /*
  218  * rootconfig is stored in $sysconfdir (/usr/local/etc by default)
  219  */
  220 #define ROOTCONFIG "xcdroast.conf"
  221 
  222 /*
  223  * font definitions
  224  */
  225 #define PANGO_MONOSPACE "Monospace 10"
  226 #define PANGO_BOLD "Normal Bold"
  227 #define PANGO_BIG "Normal 18"
  228 #define PANGO_ITALIC "Italic"
  229 
  230 /*
  231  * default window sizes - usage autodetected
  232  */
  233 #define XCDR_TOPLEVEL_X0 790    /* 75dpi fonts */
  234 #define XCDR_TOPLEVEL_Y0 550
  235 
  236 #define XCDR_TOPLEVEL_X1 1010   /* 100dpi fonts */
  237 #define XCDR_TOPLEVEL_Y1 670
  238 
  239 /*
  240  * file selector modes
  241  */
  242 #define MODE_OPEN 0
  243 #define MODE_SAVE 1
  244 
  245 /*
  246  * used to enable/disable labels
  247  */
  248 #define ENABLEDCOLOR "enabled"
  249 #define DISABLEDCOLOR "disabled"
  250 #define SELECTEDCLISTCOL "gray70"
  251 
  252 /*
  253  * text shortcuts
  254  */
  255 #define T_XCDROAST "X-CD-Roast"
  256 #define T_YES _("Yes") 
  257 #define T_NO _("No") 
  258 #define T_CANCEL _("Cancel") 
  259 #define T_OK _("Ok") 
  260 #define T_CLOSE _("Close") 
  261 #define T_ANYWAY _("Continue anyway")
  262 #define T_EXIT _("Exit")
  263 
  264 /*
  265  * predefined master iso-opitions
  266  * there must be the same number of TYPES as TEXTS (minus the NULL element)
  267  */
  268 #define MASTER_TEXTS { \
  269     N_("Rock Ridge + Joliet"), \
  270     N_("Rock Ridge only"), \
  271     N_("MS-DOS"), \
  272     NULL }
  273 #define MASTER_TYPES {  { 1,1,0,0,1,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }, \
  274             { 1,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }, \
  275             { 0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } }
  276 
  277 #define DEF_BOOT_CATALOG "boot.catalog"
  278 #define ICONV_CUSTOM_CHARSET "custom charset"   /* just a placeholder for the user */
  279 
  280 /*
  281  * some defines for drag&drop
  282  */
  283 #define DRAG_TAR_NAME_0         "text/plain"
  284 #define DRAG_TAR_INFO_0         0
  285 #define DRAG_TAR_NAME_1         "text/uri-list"
  286 #define DRAG_TAR_INFO_1         1
  287 #define DRAG_TAR_NAME_2         "STRING"
  288 #define DRAG_TAR_INFO_2         2
  289 
  290 /*
  291  * long long format
  292  */
  293 #if __x86_64 || __ppc64 || __sparc64
  294 #  define LL_FORMAT "ld"
  295 #else
  296 #  define LL_FORMAT "lld"
  297 #endif