ARB
PT_extern.c
Go to the documentation of this file.
1 #include "PT_server.h"
2 #include "C/server.h"
3 
4 #include <arb_string.h>
5 
6 #include <aisc_server_proto.h>
7 #include <aisc_server_extern.h>
8 #include <import_proto.h>
9 
10 int pt_init_bond_matrix(PT_local *THIS);
11 
12 int init_bond_matrix(PT_local *THIS) {
13  pt_init_bond_matrix(THIS);
14  return 0;
15 }
16 
17 void pt_destroy_locs(PT_local *THIS) {
18  destroy_PT_local(THIS);
19 }
20 
21 int pt_init_socket(PT_local *THIS) {
22  aisc_add_destroy_callback(AISC_CASTSIG(aisc_destroy_callback, pt_destroy_locs), (long)THIS);
23  return 0;
24 }
25 
26 void pt_destroy_socket(PT_local *) {
28 }
29 
30 aisc_string get_LOCS_ERROR(PT_local *THIS) {
31  static char *error_buf = NULp;
32  if (error_buf) free(error_buf);
33  error_buf = THIS->ls_error;
34  THIS->ls_error = ARB_strdup("");
35  return error_buf;
36 }
void pt_destroy_socket(PT_local *)
Definition: PT_extern.c:26
char * ARB_strdup(const char *str)
Definition: arb_string.h:27
int init_bond_matrix(PT_local *THIS)
Definition: PT_extern.c:12
int aisc_add_destroy_callback(aisc_destroy_callback callback, long clientdata)
Definition: server.c:1151
#define AISC_CASTSIG(sig, cb)
Definition: aisc_global.h:47
aisc_string get_LOCS_ERROR(PT_local *THIS)
Definition: PT_extern.c:30
static char error_buf[ERRORBUFSIZE]
Definition: server.c:114
void aisc_remove_destroy_callback()
Definition: server.c:1172
int pt_init_bond_matrix(PT_local *THIS)
#define NULp
Definition: cxxforward.h:116
void pt_destroy_locs(PT_local *THIS)
Definition: PT_extern.c:17
int pt_init_socket(PT_local *THIS)
Definition: PT_extern.c:21