~ubuntu-branches/ubuntu/gutsy/ncbi-tools6/gutsy

« back to all changes in this revision

Viewing changes to network/medarch/client/medarch.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:   03/31/93
31
31
*
32
 
* $Revision: 6.1 $
 
32
* $Revision: 6.2 $
33
33
*
34
34
* File Description: 
35
35
*       API for Medline Archive service
53
53
*
54
54
* RCS Modification History:
55
55
* $Log: medarch.c,v $
 
56
* Revision 6.2  2005/04/28 19:11:49  kans
 
57
* s_MedArchCitMatchPmId uses DEBUG_MED_ARCH_CIT_MATCH_PMID environment variable to save Mla-request to origmlarequest.txt file
 
58
*
56
59
* Revision 6.1  2004/04/01 13:43:07  lavr
57
60
* Spell "occurred", "occurrence", and "occurring"
58
61
*
959
962
/*+
960
963
-*/
961
964
/******************************************************************************/
 
965
static Boolean debug_med_arch_cit_match_pmid = FALSE;
 
966
static Boolean debug_med_arch_cit_match_pmid_set = FALSE;
 
967
 
962
968
static Int4
963
969
/*FCN*/s_MedArchCitMatchPmId (
964
970
  ValNodePtr pub
965
971
){
966
972
    MlaRequestPtr mlarp;
967
973
    Int4 pmid;
 
974
#ifdef OS_UNIX
 
975
    AsnIoPtr  aip;
 
976
    CharPtr   str;
 
977
#endif
968
978
 
969
979
    mlarp = ValNodeNew(NULL);
970
980
    mlarp->choice = MlaRequest_citmatchpmid;
971
981
    mlarp->data.ptrvalue = pub;
 
982
#ifdef OS_UNIX
 
983
    if (! debug_med_arch_cit_match_pmid_set) {
 
984
      str = (CharPtr) getenv ("DEBUG_MED_ARCH_CIT_MATCH_PMID");
 
985
      if (StringDoesHaveText (str)) {
 
986
        if (StringICmp (str, "TRUE") == 0) {
 
987
          debug_med_arch_cit_match_pmid = TRUE;
 
988
        }
 
989
      }
 
990
      debug_med_arch_cit_match_pmid_set = TRUE;
 
991
    }
 
992
 
 
993
    if (debug_med_arch_cit_match_pmid) {
 
994
      if (mlarp != NULL) {
 
995
        aip = AsnIoOpen ("origmlarequest.txt", "w");
 
996
        if (aip != NULL) {
 
997
          MlaRequestAsnWrite (mlarp, aip, NULL);
 
998
          AsnIoClose (aip);
 
999
        }
 
1000
      }
 
1001
    }
 
1002
#endif
972
1003
    MlaRequestAsnWrite (mlarp, asnout, NULL);
973
1004
    AsnIoReset(asnout);
974
1005
    mlarp->data.ptrvalue = NULL; /* for clean free */