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

« back to all changes in this revision

Viewing changes to PROBE_SET/ps_my2ascii.cxx

  • 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
 
#include <stdio.h>
2
 
#include <stdlib.h>
3
 
#include <string.h>
 
1
// =============================================================== //
 
2
//                                                                 //
 
3
//   File      : ps_my2ascii.cxx                                   //
 
4
//   Purpose   :                                                   //
 
5
//                                                                 //
 
6
//   Coded by Wolfram Foerster in October 2002                     //
 
7
//   Institute of Microbiology (Technical University Munich)       //
 
8
//   http://www.arb-home.de/                                       //
 
9
//                                                                 //
 
10
// =============================================================== //
4
11
 
5
 
#ifndef PS_FILE_BUFFER_HXX
6
 
#include "ps_filebuffer.hxx"
7
 
#endif
8
 
#ifndef PS_NODE_HXX
9
12
#include "ps_node.hxx"
10
 
#endif
11
 
 
12
 
//  ====================================================
13
 
//  ====================================================
14
 
 
15
 
int main( int argc,  char *argv[] ) {
 
13
 
 
14
//  ====================================================
 
15
//  ====================================================
 
16
 
 
17
int main(int argc,   char *argv[]) {
16
18
 
17
19
    //
18
20
    // check arguments
19
21
    //
20
22
    if (argc < 3) {
21
 
        printf("Missing arguments\n Usage %s <input database name> <output database name>\n",argv[0]);
 
23
        printf("Missing arguments\n Usage %s <input database name> <output database name>\n", argv[0]);
22
24
        exit(1);
23
25
    }
24
26
 
27
29
    //
28
30
    PS_Node       *root          = new PS_Node(-1);
29
31
    const char    *input_DB_name = argv[1];
30
 
    PS_FileBuffer *ps_db_fb      = new PS_FileBuffer( input_DB_name, PS_FileBuffer::READONLY );
 
32
    PS_FileBuffer *ps_db_fb      = new PS_FileBuffer(input_DB_name, PS_FileBuffer::READONLY);
31
33
 
32
 
    printf( "Opening input-probe-set-database '%s'..\n", input_DB_name );
33
 
    root->load( ps_db_fb );
34
 
    printf( "loaded database (enter to continue)\n" );
35
 
//     getchar();
 
34
    printf("Opening input-probe-set-database '%s'..\n", input_DB_name);
 
35
    root->load(ps_db_fb);
 
36
    printf("loaded database (enter to continue)\n");
36
37
 
37
38
    //
38
39
    // write as ASCII
39
40
    //
40
41
    const char *output_DB_name = argv[2];
41
 
    printf( "writing probe-data to %s\n",output_DB_name );
42
 
    ps_db_fb->reinit( output_DB_name, PS_FileBuffer::WRITEONLY );
43
 
    char *buffer = (char *)malloc( 512 );
44
 
    root->saveASCII( ps_db_fb,buffer );
45
 
    printf( "(enter to continue)\n" );
46
 
//     getchar();
 
42
    printf("writing probe-data to %s\n", output_DB_name);
 
43
    ps_db_fb->reinit(output_DB_name, PS_FileBuffer::WRITEONLY);
 
44
    char *buffer = (char *)malloc(512);
 
45
    root->saveASCII(ps_db_fb, buffer);
 
46
    printf("(enter to continue)\n");
47
47
 
48
48
    //
49
49
    // clean up
50
50
    //
51
 
    free( buffer );
 
51
    free(buffer);
52
52
    delete ps_db_fb;
53
 
    printf( "(enter to continue)\n" );
54
 
//     getchar();
 
53
    printf("(enter to continue)\n");
55
54
 
56
55
    return 0;
57
56
}