Some changes by Tagg for Win version release-1-12-maintained
authorinsilmaril
Fri, 05 Mar 2010 20:16:46 +0000
branchrelease-1-12-maintained
changeset 805c5b4464b24f
parent 79 32f499cbe874
child 81 876eed30ba3b
Some changes by Tagg for Win version
mkdtemp.cpp
mkdtemp.h
tex/vym.changelog
version.h
vym.pro
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/mkdtemp.cpp	Fri Mar 05 20:16:46 2010 +0000
     1.3 @@ -0,0 +1,63 @@
     1.4 +#include "mkdtemp.h"
     1.5 +#include <stdint.h>
     1.6 +#include <string.h>
     1.7 +#include <errno.h>
     1.8 +#include <io.h>
     1.9 +
    1.10 +char *
    1.11 +mkdtemp(char *tmpl)
    1.12 +{
    1.13 +    // Implementation based on GLIBC implementation.
    1.14 +
    1.15 +    static const char letters[] =
    1.16 +        "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
    1.17 +
    1.18 +    static uint64_t value;
    1.19 +
    1.20 +    const unsigned int ATTEMPTS_MIN = (62 * 62 * 62);
    1.21 +
    1.22 +    int save_errno = errno;
    1.23 +
    1.24 +    size_t len = strlen(tmpl);
    1.25 +    if (len < 6 || strcmp(&tmpl[len - 6], "XXXXXX"))
    1.26 +    {
    1.27 +        errno = EINVAL;
    1.28 +        return NULL;
    1.29 +    }
    1.30 +
    1.31 +    char *XXXXXX = &tmpl[len - 6];
    1.32 +
    1.33 +    uint64_t random_time_bits = time(NULL);
    1.34 +
    1.35 +    value += (random_time_bits ^ getpid());
    1.36 +
    1.37 +    unsigned int count;
    1.38 +    for (count = 0; count < ATTEMPTS_MIN; value += 7777, ++count)
    1.39 +    {
    1.40 +        uint64_t v = value;
    1.41 +
    1.42 +        XXXXXX[0] = letters[v % 62];
    1.43 +        v /= 62;
    1.44 +        XXXXXX[1] = letters[v % 62];
    1.45 +        v /= 62;
    1.46 +        XXXXXX[2] = letters[v % 62];
    1.47 +        v /= 62;
    1.48 +        XXXXXX[3] = letters[v % 62];
    1.49 +        v /= 62;
    1.50 +        XXXXXX[4] = letters[v % 62];
    1.51 +        v /= 62;
    1.52 +        XXXXXX[5] = letters[v % 62];
    1.53 +
    1.54 +		if (mkdir(tmpl) == 0)
    1.55 +        {
    1.56 +            errno = save_errno;
    1.57 +			return tmpl;
    1.58 +        }
    1.59 +
    1.60 +		if (errno != EEXIST)
    1.61 +			return NULL;
    1.62 +    }
    1.63 +
    1.64 +    errno = EEXIST;
    1.65 +    return NULL;
    1.66 +}
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/mkdtemp.h	Fri Mar 05 20:16:46 2010 +0000
     2.3 @@ -0,0 +1,18 @@
     2.4 +#ifndef MKDTEMP_H
     2.5 +#define MKDTEMP_H
     2.6 +
     2.7 +extern char *mkdtemp(char *_template);
     2.8 +
     2.9 +#ifndef WIN32
    2.10 +#include <sys/time.h>
    2.11 +#else
    2.12 +#include <time.h>
    2.13 +#include <direct.h>
    2.14 +typedef int pid_t;
    2.15 +#endif
    2.16 +
    2.17 +extern "C" {
    2.18 +pid_t getpid (void);
    2.19 +}
    2.20 +
    2.21 +#endif
    2.22 \ No newline at end of file
     3.1 --- a/tex/vym.changelog	Fri Mar 05 19:15:08 2010 +0000
     3.2 +++ b/tex/vym.changelog	Fri Mar 05 20:16:46 2010 +0000
     3.3 @@ -1,3 +1,9 @@
     3.4 +-------------------------------------------------------------------
     3.5 +Fri Mar 05 19:34:51 CET 2010 - taggm@diminutia.us
     3.6 +
     3.7 +- Version: 1.12.7
     3.8 +- Feature: Changes for windows version
     3.9 +
    3.10  -------------------------------------------------------------------
    3.11  Mon Nov 30 19:34:51 CET 2009 - uwedr@suse.de
    3.12  
     4.1 --- a/version.h	Fri Mar 05 19:15:08 2010 +0000
     4.2 +++ b/version.h	Fri Mar 05 20:16:46 2010 +0000
     4.3 @@ -4,10 +4,10 @@
     4.4  #include <QString>
     4.5  
     4.6  #define __VYM_NAME "VYM"
     4.7 -#define __VYM_VERSION "1.12.6"
     4.8 -#define __VYM_CODENAME "Maintenance Update "
     4.9 +#define __VYM_VERSION "1.12.7"
    4.10 +#define __VYM_CODENAME "Windows version"
    4.11  //#define __VYM_CODENAME "Codename: development version"
    4.12 -#define __VYM_BUILD_DATE "2009-11-30"
    4.13 +#define __VYM_BUILD_DATE "2010-03-05"
    4.14  
    4.15  
    4.16  bool checkVersion(const QString &);
     5.1 --- a/vym.pro	Fri Mar 05 19:15:08 2010 +0000
     5.2 +++ b/vym.pro	Fri Mar 05 20:16:46 2010 +0000
     5.3 @@ -1,9 +1,10 @@
     5.4 -TEMPLATE	= app
     5.5 -LANGUAGE	= C++
     5.6 -
     5.7 -CONFIG	+= qt warn_on debug_and_release
     5.8 -CONFIG += x86 ppc
     5.9 -
    5.10 +TEMPLATE = app
    5.11 +LANGUAGE = C++
    5.12 +CONFIG += qt \
    5.13 +    warn_on \
    5.14 +    debug_and_release
    5.15 +CONFIG += x86 \
    5.16 +    ppc
    5.17  TRANSLATIONS += lang/vym_de.ts
    5.18  TRANSLATIONS += lang/vym_en.ts
    5.19  TRANSLATIONS += lang/vym_es.ts
    5.20 @@ -16,176 +17,160 @@
    5.21  TRANSLATIONS += lang/vym_zh_TW.ts
    5.22  
    5.23  # Manifest embedding was suggested by Qt docs somewhere...
    5.24 -win32: CONFIG += embed_manifest_exe
    5.25 +win32:CONFIG += embed_manifest_exe
    5.26  
    5.27  # Without this, M_PI, and M_PI_2 won`t be defined.
    5.28  win32:DEFINES *= _USE_MATH_DEFINES
    5.29 -
    5.30 -ICON =icons/vym.icns
    5.31 -
    5.32 +ICON = icons/vym.icns
    5.33  QT += qt3support
    5.34  QT += network
    5.35 -
    5.36 -HEADERS	+= \
    5.37 -	aboutdialog.h \
    5.38 -	animpoint.h \
    5.39 -	attribute.h \
    5.40 -	attributedelegate.h\
    5.41 -	attributedialog.h \
    5.42 -	attributewidget.h \
    5.43 -	branchobj.h \
    5.44 -	branchpropwindow.h\
    5.45 -	editxlinkdialog.h \
    5.46 -	exportoofiledialog.h \
    5.47 -	exportxhtmldialog.h\
    5.48 -	exports.h \
    5.49 -	extrainfodialog.h \
    5.50 -	file.h \
    5.51 -	findwindow.h \
    5.52 -	flagobj.h \
    5.53 -	flagrowobj.h \
    5.54 -	floatimageobj.h \
    5.55 -	floatobj.h \
    5.56 -	frameobj.h \
    5.57 -	geometry.h \
    5.58 -	headingobj.h \
    5.59 -	highlighter.h \
    5.60 -	historywindow.h \
    5.61 -	imageobj.h \
    5.62 -	imports.h \
    5.63 -	linkablemapobj.h \
    5.64 -	mainwindow.h \
    5.65 -	mapcenterobj.h \
    5.66 -	mapeditor.h \
    5.67 -	mapobj.h \
    5.68 -	misc.h \
    5.69 -	noteobj.h \
    5.70 -	options.h \
    5.71 -	ornamentedobj.h \
    5.72 -	parser.h \
    5.73 -	process.h \
    5.74 -	selection.h \
    5.75 -	showtextdialog.h\
    5.76 -	simplescripteditor.h\
    5.77 -	texteditor.h \
    5.78 -	version.h \
    5.79 -	vymmodel.h \
    5.80 -	xlinkobj.h \
    5.81 -	xml-base.h \
    5.82 -	xml-vym.h \
    5.83 -	xml-freemind.h \
    5.84 -	xmlobj.h\
    5.85 -	xsltproc.h \
    5.86 -	settings.h \
    5.87 -	warningdialog.h
    5.88 -
    5.89 -SOURCES	+= \
    5.90 -	aboutdialog.cpp \
    5.91 -	animpoint.cpp \
    5.92 -	attribute.cpp \
    5.93 -	attributedelegate.cpp \
    5.94 -	attributedialog.cpp \
    5.95 -	attributewidget.cpp \
    5.96 -	branchobj.cpp \
    5.97 -	branchpropwindow.cpp \
    5.98 -	editxlinkdialog.cpp \
    5.99 -	exportoofiledialog.cpp \
   5.100 -	exports.cpp \
   5.101 -	exportxhtmldialog.cpp \
   5.102 -	extrainfodialog.cpp \
   5.103 -	file.cpp \
   5.104 -	findwindow.cpp \
   5.105 -	flagobj.cpp \
   5.106 -	flagrowobj.cpp \
   5.107 -	floatimageobj.cpp \
   5.108 -	floatobj.cpp \
   5.109 -	frameobj.cpp \
   5.110 -	geometry.cpp \
   5.111 -	headingobj.cpp \
   5.112 -	highlighter.cpp \
   5.113 -	historywindow.cpp \
   5.114 -	imageobj.cpp \
   5.115 -	imports.cpp \
   5.116 -	linkablemapobj.cpp \
   5.117 -	main.cpp \
   5.118 -	mainwindow.cpp \
   5.119 -	mapcenterobj.cpp \
   5.120 -	mapeditor.cpp \
   5.121 -	mapobj.cpp \
   5.122 -	misc.cpp \
   5.123 -	noteobj.cpp \
   5.124 -	options.cpp \
   5.125 -	ornamentedobj.cpp \
   5.126 -	parser.cpp \
   5.127 -	process.cpp \
   5.128 -	selection.cpp \
   5.129 -	showtextdialog.cpp \
   5.130 -	simplescripteditor.cpp \
   5.131 -	texteditor.cpp \
   5.132 -	version.cpp \
   5.133 -	vymmodel.cpp \
   5.134 -	xlinkobj.cpp \
   5.135 -	xml-base.cpp \
   5.136 -	xml-vym.cpp \
   5.137 -	xml-freemind.cpp \
   5.138 -	xmlobj.cpp \
   5.139 -	xsltproc.cpp \
   5.140 -	settings.cpp \
   5.141 -	warningdialog.cpp
   5.142 -
   5.143 -FORMS = \
   5.144 -	attributewidget.ui \
   5.145 -	branchpropwindow.ui \
   5.146 -	exportxhtmldialog.ui \
   5.147 -	extrainfodialog.ui \
   5.148 -	editxlinkdialog.ui \
   5.149 -	historywindow.ui \
   5.150 -	simplescripteditor.ui \
   5.151 -	showtextdialog.ui \
   5.152 -	warningdialog.ui
   5.153 -
   5.154 -win32 {
   5.155 -	HEADERS += mkdtemp.h
   5.156 -	SOURCES += mkdtemp.cpp
   5.157 -	RC_FILE = vym.rc
   5.158 +HEADERS += aboutdialog.h \
   5.159 +    animpoint.h \
   5.160 +    attribute.h \
   5.161 +    attributedelegate.h \
   5.162 +    attributedialog.h \
   5.163 +    attributewidget.h \
   5.164 +    branchobj.h \
   5.165 +    branchpropwindow.h \
   5.166 +    editxlinkdialog.h \
   5.167 +    exportoofiledialog.h \
   5.168 +    exportxhtmldialog.h \
   5.169 +    exports.h \
   5.170 +    extrainfodialog.h \
   5.171 +    file.h \
   5.172 +    findwindow.h \
   5.173 +    flagobj.h \
   5.174 +    flagrowobj.h \
   5.175 +    floatimageobj.h \
   5.176 +    floatobj.h \
   5.177 +    frameobj.h \
   5.178 +    geometry.h \
   5.179 +    headingobj.h \
   5.180 +    highlighter.h \
   5.181 +    historywindow.h \
   5.182 +    imageobj.h \
   5.183 +    imports.h \
   5.184 +    linkablemapobj.h \
   5.185 +    mainwindow.h \
   5.186 +    mapcenterobj.h \
   5.187 +    mapeditor.h \
   5.188 +    mapobj.h \
   5.189 +    misc.h \
   5.190 +    noteobj.h \
   5.191 +    options.h \
   5.192 +    ornamentedobj.h \
   5.193 +    parser.h \
   5.194 +    process.h \
   5.195 +    selection.h \
   5.196 +    showtextdialog.h \
   5.197 +    simplescripteditor.h \
   5.198 +    texteditor.h \
   5.199 +    version.h \
   5.200 +    vymmodel.h \
   5.201 +    xlinkobj.h \
   5.202 +    xml-base.h \
   5.203 +    xml-vym.h \
   5.204 +    xml-freemind.h \
   5.205 +    xmlobj.h \
   5.206 +    xsltproc.h \
   5.207 +    settings.h \
   5.208 +    warningdialog.h \
   5.209 +    win32/stdint.h
   5.210 +SOURCES += aboutdialog.cpp \
   5.211 +    animpoint.cpp \
   5.212 +    attribute.cpp \
   5.213 +    attributedelegate.cpp \
   5.214 +    attributedialog.cpp \
   5.215 +    attributewidget.cpp \
   5.216 +    branchobj.cpp \
   5.217 +    branchpropwindow.cpp \
   5.218 +    editxlinkdialog.cpp \
   5.219 +    exportoofiledialog.cpp \
   5.220 +    exports.cpp \
   5.221 +    exportxhtmldialog.cpp \
   5.222 +    extrainfodialog.cpp \
   5.223 +    file.cpp \
   5.224 +    findwindow.cpp \
   5.225 +    flagobj.cpp \
   5.226 +    flagrowobj.cpp \
   5.227 +    floatimageobj.cpp \
   5.228 +    floatobj.cpp \
   5.229 +    frameobj.cpp \
   5.230 +    geometry.cpp \
   5.231 +    headingobj.cpp \
   5.232 +    highlighter.cpp \
   5.233 +    historywindow.cpp \
   5.234 +    imageobj.cpp \
   5.235 +    imports.cpp \
   5.236 +    linkablemapobj.cpp \
   5.237 +    main.cpp \
   5.238 +    mainwindow.cpp \
   5.239 +    mapcenterobj.cpp \
   5.240 +    mapeditor.cpp \
   5.241 +    mapobj.cpp \
   5.242 +    misc.cpp \
   5.243 +    noteobj.cpp \
   5.244 +    options.cpp \
   5.245 +    ornamentedobj.cpp \
   5.246 +    parser.cpp \
   5.247 +    process.cpp \
   5.248 +    selection.cpp \
   5.249 +    showtextdialog.cpp \
   5.250 +    simplescripteditor.cpp \
   5.251 +    texteditor.cpp \
   5.252 +    version.cpp \
   5.253 +    vymmodel.cpp \
   5.254 +    xlinkobj.cpp \
   5.255 +    xml-base.cpp \
   5.256 +    xml-vym.cpp \
   5.257 +    xml-freemind.cpp \
   5.258 +    xmlobj.cpp \
   5.259 +    xsltproc.cpp \
   5.260 +    settings.cpp \
   5.261 +    warningdialog.cpp
   5.262 +FORMS = attributewidget.ui \
   5.263 +    branchpropwindow.ui \
   5.264 +    exportxhtmldialog.ui \
   5.265 +    extrainfodialog.ui \
   5.266 +    editxlinkdialog.ui \
   5.267 +    historywindow.ui \
   5.268 +    simplescripteditor.ui \
   5.269 +    showtextdialog.ui \
   5.270 +    warningdialog.ui
   5.271 +win32 { 
   5.272 +    HEADERS += mkdtemp.h
   5.273 +    SOURCES += mkdtemp.cpp
   5.274 +    RC_FILE = vym.rc
   5.275  }
   5.276  
   5.277 -#The following lines were inserted by qt3to4
   5.278 +# The following lines were inserted by qt3to4
   5.279  QT += xml
   5.280 -
   5.281 -TARGET  = vym
   5.282 -
   5.283 -
   5.284 -isEmpty( PREFIX ) {
   5.285 -	PREFIX = /usr/local
   5.286 -	count( INSTALLDIR, 1 ) {
   5.287 -		PREFIX = $${INSTALLDIR}
   5.288 -		message( "Please use PREFIX instead of INSTALLDIR" )
   5.289 -	}
   5.290 +TARGET = vym
   5.291 +isEmpty( PREFIX ) { 
   5.292 +    PREFIX = /usr/local
   5.293 +    count( INSTALLDIR, 1 ) { 
   5.294 +        PREFIX = $${INSTALLDIR}
   5.295 +        message( "Please use PREFIX instead of INSTALLDIR" )
   5.296 +    }
   5.297  }
   5.298 -isEmpty( BINDIR ) {
   5.299 -	BINDIR = $${PREFIX}/bin
   5.300 -}
   5.301 -isEmpty( DATADIR ) {
   5.302 -	DATADIR = $${PREFIX}/share
   5.303 -}
   5.304 -isEmpty( DOCDIR ) {
   5.305 -	DOCDIR = $${DATADIR}/doc/packages/vym
   5.306 -}
   5.307 -
   5.308 +isEmpty( BINDIR ):BINDIR = $${PREFIX}/bin
   5.309 +isEmpty( DATADIR ):DATADIR = $${PREFIX}/share
   5.310 +isEmpty( DOCDIR ):DOCDIR = $${DATADIR}/doc/packages/vym
   5.311  message( "Installation directory" )
   5.312  message( $$PREFIX )
   5.313 -
   5.314 -
   5.315  target.path = $${BINDIR}
   5.316  INSTALLS += target
   5.317 -
   5.318 -support.files = styles/ scripts/ icons/ flags/ lang/ macros/ exports/ demos/
   5.319 +support.files = styles/ \
   5.320 +    scripts/ \
   5.321 +    icons/ \
   5.322 +    flags/ \
   5.323 +    lang/ \
   5.324 +    macros/ \
   5.325 +    exports/ \
   5.326 +    demos/
   5.327  support.path = $${DATADIR}/vym
   5.328 -INSTALLS += support 
   5.329 -
   5.330 +INSTALLS += support
   5.331  doc.files = doc/vym.pdf
   5.332  doc.path = $${DOCDIR}
   5.333  INSTALLS += doc
   5.334  DEFINES += VYM_DOCDIR=\\\"$${DOCDIR}\\\"
   5.335 -