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

« back to all changes in this revision

Viewing changes to connect/ncbi_connector.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:
1
 
/* $Id: ncbi_connector.c,v 6.4 2001/03/02 20:07:56 lavr Exp $
 
1
/* $Id: ncbi_connector.c,v 6.7 2002/08/13 19:29:49 lavr Exp $
2
2
 * ===========================================================================
3
3
 *
4
4
 *                            PUBLIC DOMAIN NOTICE
29
29
 *   This is generally not for the public use.
30
30
 *   Implementation of functions of meta-connector.
31
31
 *
32
 
 * --------------------------------------------------------------------------
33
 
 * $Log: ncbi_connector.c,v $
34
 
 * Revision 6.4  2001/03/02 20:07:56  lavr
35
 
 * Typo fixed
36
 
 *
37
 
 * Revision 6.3  2001/01/25 16:57:08  lavr
38
 
 * METACONN_Remove revoked call to free() with connector:
39
 
 * connector's DESTROY method is now (back) responsible to call free().
40
 
 *
41
 
 * Revision 6.2  2001/01/12 23:51:38  lavr
42
 
 * Message logging modified for use LOG facility only
43
 
 *
44
 
 * Revision 6.1  2000/12/29 17:49:29  lavr
45
 
 * Initial revision
46
 
 *
47
 
 * ==========================================================================
48
32
 */
49
33
 
50
34
#include "ncbi_priv.h"
51
35
#include <connect/ncbi_connector.h>
52
 
#include <stdlib.h>
53
36
 
54
37
 
55
38
/* Standard logging message
56
39
 */
57
 
#define METACONN_LOG(level, descr) \
58
 
  CORE_LOGF(level, \
59
 
            ("%s (connector \"%s\", error \"%s\")", \
60
 
            descr, \
61
 
            (*meta->get_type)(meta->c_get_type), \
 
40
#define METACONN_LOG(level, descr)                      \
 
41
  CORE_LOGF(level,                                      \
 
42
            ("%s (connector \"%s\", error \"%s\")",     \
 
43
            descr, (*meta->get_type)(meta->c_get_type), \
62
44
            IO_StatusStr(status)))
63
45
 
64
46
 
87
69
        victim->meta = 0;
88
70
        victim->next = 0;
89
71
        if (victim->destroy)
90
 
            (*victim->destroy)(victim);
 
72
            victim->destroy(victim);
91
73
        if (victim == connector)
92
74
            break;
93
75
    }
109
91
        return status;
110
92
    }
111
93
 
112
 
    (*connector->setup)(meta, connector);
 
94
    connector->setup(meta, connector);
113
95
    connector->meta = meta;
114
96
    connector->next = meta->list;
115
97
    meta->list = connector;
116
98
 
117
99
    return eIO_Success;
118
100
}
 
101
 
 
102
 
 
103
/*
 
104
 * --------------------------------------------------------------------------
 
105
 * $Log: ncbi_connector.c,v $
 
106
 * Revision 6.7  2002/08/13 19:29:49  lavr
 
107
 * Log moved to end
 
108
 *
 
109
 * Revision 6.6  2002/04/26 16:31:06  lavr
 
110
 * Minor style changes in call-by-pointer functions
 
111
 *
 
112
 * Revision 6.5  2002/03/22 22:17:29  lavr
 
113
 * No <stdlib.h> needed in here, removed
 
114
 *
 
115
 * Revision 6.4  2001/03/02 20:07:56  lavr
 
116
 * Typo fixed
 
117
 *
 
118
 * Revision 6.3  2001/01/25 16:57:08  lavr
 
119
 * METACONN_Remove revoked call to free() with connector:
 
120
 * connector's DESTROY method is now (back) responsible to call free().
 
121
 *
 
122
 * Revision 6.2  2001/01/12 23:51:38  lavr
 
123
 * Message logging modified for use LOG facility only
 
124
 *
 
125
 * Revision 6.1  2000/12/29 17:49:29  lavr
 
126
 * Initial revision
 
127
 *
 
128
 * ==========================================================================
 
129
 */