~ubuntu-branches/ubuntu/edgy/ncbi-tools6/edgy

« back to all changes in this revision

Viewing changes to connect/test/test_ncbi_sendmail.c

  • Committer: Bazaar Package Importer
  • Author(s): Barry deFreese
  • Date: 2006-07-19 23:28:07 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20060719232807-et3cdmcjgmnyleyx
Tags: 6.1.20060507-3ubuntu1
Re-merge with Debian

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*  $Id: test_ncbi_sendmail.c,v 6.16 2005/07/11 18:24:51 lavr Exp $
 
1
/*  $Id: test_ncbi_sendmail.c,v 6.17 2005/12/14 21:44:55 lavr Exp $
2
2
 * ===========================================================================
3
3
 *
4
4
 *                            PUBLIC DOMAIN NOTICE
101
101
 
102
102
    if (argc > 1) {
103
103
        CORE_LOG(eLOG_Note, "Special test requested");
104
 
        if ((fp = fopen(argv[1], "rb")) != 0  &&
105
 
            fseek(fp, 0, SEEK_END) == 0       &&
106
 
            (m = ftell(fp)) != (size_t)(-1)   &&
107
 
            fseek(fp, 0, SEEK_SET) == 0       &&
108
 
            (huge_body = malloc(m + 1)) != 0  &&
 
104
        if ((fp = fopen(argv[1], "rb")) != 0          &&
 
105
            fseek(fp, 0, SEEK_END) == 0               &&
 
106
            (m = ftell(fp)) != (size_t)(-1)           &&
 
107
            fseek(fp, 0, SEEK_SET) == 0               &&
 
108
            (huge_body = (char*) malloc(m + 1)) != 0  &&
109
109
            fread(huge_body, m, 1, fp) == 1) {
110
110
            huge_body[m] = '\0';
111
111
            CORE_LOGF(eLOG_Note, ("Sending file (%lu bytes)",
283
283
/*
284
284
 * --------------------------------------------------------------------------
285
285
 * $Log: test_ncbi_sendmail.c,v $
 
286
 * Revision 6.17  2005/12/14 21:44:55  lavr
 
287
 * Prettier formatting only
 
288
 *
286
289
 * Revision 6.16  2005/07/11 18:24:51  lavr
287
290
 * Spell ADDEND
288
291
 *