~ubuntu-branches/debian/jessie/arb/jessie

« back to all changes in this revision

Viewing changes to SOURCE_TOOLS/arb_main.h

  • Committer: Package Import Robot
  • Author(s): Elmar Pruesse, Andreas Tille, Elmar Pruesse
  • Date: 2014-09-02 15:15:06 UTC
  • mfrom: (1.1.6)
  • Revision ID: package-import@ubuntu.com-20140902151506-jihq58b3iz342wif
Tags: 6.0.2-1
[ Andreas Tille ]
* New upstream version
  Closes: #741890
* debian/upstream -> debian/upstream/metadata
* debian/control:
   - Build-Depends: added libglib2.0-dev
   - Depends: added mafft, mrbayes
* debian/rules
   - Add explicite --remove-section=.comment option to manual strip call
* cme fix dpkg-control
* arb-common.dirs: Do not create unneeded lintian dir
* Add turkish debconf translation (thanks for the patch to Mert Dirik
  <mertdirik@gmail.com>)
  Closes: #757497

[ Elmar Pruesse ]
* patches removed:
   - 10_config.makefiles.patch,
     80_no_GL.patch
       removed in favor of creating file from config.makefile.template via 
       sed in debian/control
   - 20_Makefile_main.patch
       merged upstream
   - 21_Makefiles.patch
       no longer needed
   - 30_tmpfile_CVE-2008-5378.patch: 
       merged upstream
   - 50_fix_gcc-4.8.patch:
       merged upstream
   - 40_add_libGLU.patch:
       libGLU not needed for arb_ntree)
   - 60_use_debian_packaged_raxml.patch:
       merged upstream
   - 70_hardening.patch
       merged upstream
   - 72_add_math_lib_to_linker.patch
       does not appear to be needed
* patches added:
   - 10_upstream_r12793__show_db_load_progress:
       backported patch showing progress while ARB is loading a database
       (needed as indicator/splash screen while ARB is launching)
   - 20_upstream_r12794__socket_permissions:
       backported security fix
   - 30_upstream_r12814__desktop_keywords:
       backported add keywords to desktop (fixes lintian warning)
   - 40_upstream_r12815__lintian_spelling:
       backported fix for lintian reported spelling errors
   - 50_private_nameservers
       change configuration to put nameservers into users home dirs
       (avoids need for shared writeable directory)
   - 60_use_debian_phyml
       use phyml from debian package for both interfaces in ARB
* debian/rules:
   - create config.makefile from override_dh_configure target
   - use "make tarfile" in override_dh_install
   - remove extra cleaning not needed for ARB 6
   - use "dh_install --list-missing" to avoid missing files
   - added override_dh_fixperms target
* debian/control:
   - added libarb-dev package
   - Depends: added phyml, xdg-utils
   - Suggests: removed phyml
   - fix lintian duplicate-short-description (new descriptions)
* debian/*.install:
   - "unrolled" confusing globbing to select files
   - pick files from debian/tmp
   - moved all config files to /etc/arb
* debian/arb-common.templates: updated
* scripts:
   - removed arb-add-pt-server
   - launch-wrapper: 
     - only add demo.arb to newly created $ARBUSERDATA
     - pass commandline arguments through bin/arb wrapper
   - preinst: removing old PT server index files on upgrade from 5.5*
   - postinst: set setgid on shared PT dir
* rewrote arb.1 manfile
* added file icon for ARB databases
* using upstream arb_tcp.dat

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// ================================================================ //
 
2
//                                                                  //
 
3
//   File      : arb_main.h                                         //
 
4
//   Purpose   : code executed at start of main()                   //
 
5
//                                                                  //
 
6
//   Coded by Ralf Westram (coder@reallysoft.de) in February 2014   //
 
7
//   http://www.arb-home.de/                                        //
 
8
//                                                                  //
 
9
// ================================================================ //
 
10
 
 
11
#ifndef ARB_MAIN_H
 
12
#define ARB_MAIN_H
 
13
 
 
14
#include <locale.h>
 
15
 
 
16
static void start_of_main() {
 
17
    // const char *USER_LOCALE = ""; // -> use user-defined locale
 
18
    const char *USER_LOCALE = "de_DE.UTF-8"; // use german locale
 
19
 
 
20
 
 
21
    // gtk apparently calls 'setlocale(LC_ALL, "");'
 
22
    // @@@ we should already call it here, to make ARB-motif-version behave samesame.
 
23
 
 
24
    // --------------------------------------------------------------------------------
 
25
    // Fails-counts mentioned below were determined under ubuntu 13.10/64bit.
 
26
    // Make sure only one section is enabled!
 
27
 
 
28
#if 1
 
29
    // enabling this section does not fail any unit test
 
30
    setlocale(LC_ALL,  "C");
 
31
    // overwritten as soon as gtk-GUI starts (causing wrong behavior throughout ARB)
 
32
#endif
 
33
 
 
34
#if 0
 
35
    // enabling this section does not fail any unit test
 
36
    setlocale(LC_ALL,     USER_LOCALE);
 
37
    setlocale(LC_NUMERIC, "C");
 
38
#endif
 
39
 
 
40
#if 0
 
41
    // enabling this section does not fail any unit test
 
42
    setlocale(LC_ALL,      "C");
 
43
    setlocale(LC_COLLATE,  USER_LOCALE);
 
44
    setlocale(LC_CTYPE,    USER_LOCALE);
 
45
    setlocale(LC_MESSAGES, USER_LOCALE);
 
46
    setlocale(LC_MONETARY, USER_LOCALE);
 
47
    setlocale(LC_TIME,     USER_LOCALE);
 
48
#endif
 
49
 
 
50
 
 
51
#if 0
 
52
    // enabling this section fails 57 unit tests (for german USER_LOCALE)
 
53
    setlocale(LC_ALL, USER_LOCALE);
 
54
#endif
 
55
 
 
56
#if 0
 
57
    // enabling this section fails 57 unit tests (for german USER_LOCALE)
 
58
    setlocale(LC_COLLATE,  "C");
 
59
    setlocale(LC_CTYPE,    "C");
 
60
    setlocale(LC_MESSAGES, "C");
 
61
    setlocale(LC_MONETARY, "C");
 
62
    setlocale(LC_NUMERIC,  USER_LOCALE);
 
63
    setlocale(LC_TIME,     "C");
 
64
#endif
 
65
 
 
66
#if 0
 
67
    // enabling this section fails 57 unit tests (for german USER_LOCALE)
 
68
    // (fails 57 unit tests under ubuntu 13.10, centos 5 and 6)
 
69
    setlocale(LC_ALL,     "C");
 
70
    setlocale(LC_NUMERIC, USER_LOCALE);
 
71
#endif
 
72
}
 
73
 
 
74
#else
 
75
#error arb_main.h included twice
 
76
#endif // ARB_MAIN_H