~ubuntu-branches/ubuntu/precise/ncbi-tools6/precise

« back to all changes in this revision

Viewing changes to api/tofile.c

  • Committer: Bazaar Package Importer
  • Author(s): Aaron M. Ucko
  • Date: 2005-03-27 12:00:15 UTC
  • mfrom: (2.1.2 hoary)
  • Revision ID: james.westby@ubuntu.com-20050327120015-embhesp32nj73p9r
Tags: 6.1.20041020-3
* Fix FTBFS under GCC 4.0 caused by inconsistent use of "static" on
  functions.  (Closes: #295110.)
* Add a watch file, now that we can.  (Upstream's layout needs version=3.)

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
*   
30
30
* Version Creation Date: 9/24/91
31
31
*
32
 
* $Revision: 6.1 $
 
32
* $Revision: 6.2 $
33
33
*
34
34
* File Description:  Converts fielded text into final report in a file
35
35
*
40
40
*
41
41
*
42
42
* $Log: tofile.c,v $
 
43
* Revision 6.2  2003/03/27 18:23:42  kans
 
44
* increased 16000 character buffer to 24000 to handle long PubMed abstracts (e.g., pmid 12209194 technical report on toxicity studies)
 
45
*
43
46
* Revision 6.1  1998/06/12 20:05:48  kans
44
47
* fixed unix compiler warnings
45
48
*
487
490
  Char  ch;
488
491
 
489
492
  ch = *(text + cnt);
490
 
  while (ch != '\0' && ch != '\n' && cnt < 16300) {
 
493
  while (ch != '\0' && ch != '\n' && cnt < 24300) {
491
494
    cnt++;
492
495
    ch = *(text + cnt);
493
496
  }
494
 
  while ((ch == '\n' || ch == '\r') && cnt < 16380) {
 
497
  while ((ch == '\n' || ch == '\r') && cnt < 24380) {
495
498
    cnt++;
496
499
    ch = *(text + cnt);
497
500
  }
510
513
  rsult = TRUE;
511
514
  start = 0;
512
515
  cntr = StringLen (text);
513
 
  cnt = MIN (cntr, 16000);
 
516
  cnt = MIN (cntr, 24000);
514
517
  cnt = SkipPastNewLine (text + start, cnt);
515
518
  while (cnt > 0) {
516
519
    tptr = TableSegment (text + start, cnt, parFmt, colFmt);
520
523
    FreeTable (tptr);
521
524
    start += cnt;
522
525
    cntr -= cnt;
523
 
    cnt = MIN (cntr, 16000);
 
526
    cnt = MIN (cntr, 24000);
524
527
    cnt = SkipPastNewLine (text + start, cnt);
525
528
  }
526
529
  return rsult;