~ubuntu-branches/ubuntu/hardy/ncbi-tools6/hardy

« back to all changes in this revision

Viewing changes to api/tofile.c

  • Committer: Bazaar Package Importer
  • Author(s): Barry deFreese
  • Date: 2005-09-27 15:38:20 UTC
  • mfrom: (1.1.3 upstream) (2.1.1 sarge)
  • Revision ID: james.westby@ubuntu.com-20050927153820-1t1sta0qirjpxaar
Tags: 6.1.20050429-1ubuntu1
GL/GLU Transition

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.2 $
 
32
* $Revision: 6.3 $
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.3  2004/12/16 18:14:50  kans
 
44
* increased buffer to 64000 to deal with pmid 15330847 huge abstract
 
45
*
43
46
* Revision 6.2  2003/03/27 18:23:42  kans
44
47
* increased 16000 character buffer to 24000 to handle long PubMed abstracts (e.g., pmid 12209194 technical report on toxicity studies)
45
48
*
490
493
  Char  ch;
491
494
 
492
495
  ch = *(text + cnt);
493
 
  while (ch != '\0' && ch != '\n' && cnt < 24300) {
 
496
  while (ch != '\0' && ch != '\n' && cnt < 64300) {
494
497
    cnt++;
495
498
    ch = *(text + cnt);
496
499
  }
497
 
  while ((ch == '\n' || ch == '\r') && cnt < 24380) {
 
500
  while ((ch == '\n' || ch == '\r') && cnt < 64380) {
498
501
    cnt++;
499
502
    ch = *(text + cnt);
500
503
  }
513
516
  rsult = TRUE;
514
517
  start = 0;
515
518
  cntr = StringLen (text);
516
 
  cnt = MIN (cntr, 24000);
 
519
  cnt = MIN (cntr, 64000);
517
520
  cnt = SkipPastNewLine (text + start, cnt);
518
521
  while (cnt > 0) {
519
522
    tptr = TableSegment (text + start, cnt, parFmt, colFmt);
523
526
    FreeTable (tptr);
524
527
    start += cnt;
525
528
    cntr -= cnt;
526
 
    cnt = MIN (cntr, 24000);
 
529
    cnt = MIN (cntr, 64000);
527
530
    cnt = SkipPastNewLine (text + start, cnt);
528
531
  }
529
532
  return rsult;