~ubuntu-branches/ubuntu/raring/ncbi-tools6/raring

« back to all changes in this revision

Viewing changes to demo/asnmacro.c

  • Committer: Package Import Robot
  • Author(s): Aaron M. Ucko
  • Date: 2011-09-05 18:55:02 UTC
  • mfrom: (1.1.11 upstream)
  • Revision ID: package-import@ubuntu.com-20110905185502-iuvmoe65ytljhckn
Tags: 6.1.20110713-1
* New upstream release.
* debian/*.symbols: update accordingly.
* make/makeshlb.unx: link libcn3dOGL.so against -lm for sqrt.
* doc/man/*.1: update for new release.
* debian/rules:
  - (VIB): add asnmacro, as upstream takes care to publish binaries thereof.
  - Retire obsolete multiarch-unaware checks for libpthread.
  - Fully modernize Debhelper usage; in particular, transition to overrides.
* debian/compat: advance to 9 per rules modernization.
* debian/ncbi-tools-bin.install: add asnmacro.
* make/makenet.unx: link asnmacro only against libraries it directly needs.
* doc/man/asnmacro.1: give asnmacro a man page.
* doc/man/Psequin.1: list it in SEE ALSO.
* network/id1arch/idfetch.c: revert redundant change (from #295110).
* Convert to multiarch.
  - debian/rules: Install libraries (and ncbithr.o) to multiarch directories.
  - debian/lib*.install: match multiarch library paths.
  - debian/control:
    + Build-Depends: debhelper (>= 8.1.3~), implying a recent dpkg-dev.
    + Set Multi-Arch: as appropriate across the board, and specify
      Pre-Depends: ${misc:Pre-Depends} for runtime libraries.
* debian/*.lintian-overrides: drop leading slashes for Lintian 2.5.x.
* debian/control: Standards-Version: 3.9.2 (already compliant).

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
*
30
30
* Version Creation Date:   4/12/07
31
31
*
32
 
* $Revision: 1.6 $
 
32
* $Revision: 1.8 $
33
33
*
34
34
* File Description: 
35
35
*
58
58
#include <objmacro.h>
59
59
#include <macroapi.h>
60
60
 
61
 
#define ASNMACRO_APP_VER "1.0"
 
61
#define ASNMACRO_APP_VER "1.2"
62
62
 
63
63
CharPtr ASNMACRO_APPLICATION = ASNMACRO_APP_VER;
64
64
 
290
290
  Pointer        dataptr;
291
291
  Uint2          datatype, entityID = 0;
292
292
  SeqEntryPtr    sep;
293
 
  Int4           num_fields = 0, num_features = 0;
294
293
 
295
294
  if (fp == NULL) return 0;
296
295
 
302
301
 
303
302
  SeqMgrIndexFeatures (entityID, NULL);
304
303
  sep = GetTopSeqEntryForEntityID (entityID);
305
 
  ApplyMacroToSeqEntry (sep, macro, &num_fields, &num_features);
306
 
  Message (MSG_POST, "For file %s, macro script affected %d fields and created %d features", path, num_fields, num_features);
 
304
  ApplyMacroToSeqEntry (sep, macro);
307
305
 
308
306
  return entityID;
309
307
}
349
347
  SeqEntryPtr  sep;
350
348
  Uint2        entityID;
351
349
  DataVal av;
352
 
  Int4         num_fields = 0, num_features = 0;
353
 
  Int4         tmp_fields, tmp_features;
354
350
  
355
351
  if (isp == NULL || osp == NULL || asp == NULL) return 1;
356
352
 
379
375
    }
380
376
    if (rval == 0) {
381
377
      entityID = ObjMgrRegister (OBJ_SEQENTRY, sep);
382
 
      tmp_fields = 0;
383
 
      tmp_features = 0;
384
 
      ApplyMacroToSeqEntry (sep, macro, &tmp_fields, &tmp_features);
385
 
      num_fields += tmp_fields;
386
 
      num_features += tmp_features;
 
378
      ApplyMacroToSeqEntry (sep, macro);
387
379
      DeleteMarkedObjects (entityID, 0, NULL);
388
380
      RenormalizeNucProtSets (sep, TRUE);
389
381
      if (! SeqEntryAsnWrite(sep, asn_out, atp)) {
399
391
  if (asn_out != osp->aip) {
400
392
    AsnIoClose(asn_out);
401
393
  }
402
 
  Message (MSG_POST, "Macro script affected %d fields and created %d features", num_fields, num_features);
403
394
  return rval;
404
395
}
405
396
 
638
629
  }
639
630
  osd.is_binary = (Boolean) myargs [d_argOutputBinary].intvalue;
640
631
 
641
 
  if (osd.base == "stdin") {
 
632
  if (StringCmp (osd.base, "stdin") == 0) {
642
633
    osd.base = NULL;
643
634
  }
644
635