source: tags/ms_r16q2/PROBE_COM/PT_extern.c

Last change on this file was 14038, checked in by westram, 7 years ago
  • fix #618 (use ar for linking)
    • library order does matter now
      • PROBE_COM/server.a and PROBE/PROBE.a depend on each other → hack: unpack lib and directly link objects
    • do not export pt_init_bond_matrix "extern C"
    • sym2testcode.pl: ignore several additional lines from nm-output
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 813 bytes
Line 
1#include <cstdio>
2#include <cstdlib>
3#include <cstring>
4#include "PT_server.h"
5#include "C/server.h"
6#include <aisc_server_proto.h>
7#include <aisc_server_extern.h>
8#include <import_proto.h>
9
10int pt_init_bond_matrix(PT_local *THIS);
11
12int init_bond_matrix(PT_local *THIS) {
13    pt_init_bond_matrix(THIS);
14    return 0;
15}
16
17void pt_destroy_locs(PT_local *THIS) {
18    destroy_PT_local(THIS);
19}
20
21int pt_init_socket(PT_local *THIS) {
22    aisc_add_destroy_callback((aisc_destroy_callback)pt_destroy_locs, (long)THIS);
23    return 0;
24}
25
26void pt_destroy_socket(PT_local *) {
27    aisc_remove_destroy_callback();
28}
29
30aisc_string get_LOCS_ERROR(PT_local *THIS) {
31    static char *error_buf = 0;
32    if (error_buf) free(error_buf);
33    error_buf = THIS->ls_error;
34    THIS->ls_error = (char *)strdup("");
35    return error_buf;
36}
Note: See TracBrowser for help on using the repository browser.