Commit c41b1a7d authored by claes's avatar claes

*** empty log message ***

parent 70d4314a
......@@ -15,6 +15,7 @@ extern "C" {
#include "pwr.h"
using namespace std;
typedef enum {
......
......@@ -11,5 +11,6 @@ pwr_obj:cnv_classread_html.obj
pwr_obj:cnv_classread_xtthelp.obj
pwr_obj:cnv_classread_src.obj
pwr_obj:cnv_classread_struct.obj
pwr_obj:cnv_help.obj
pwr_lib:libpwr_co/lib
pwr_obj:pwr_msg_co.obj
......@@ -212,7 +212,7 @@ main ()
static void
Init ()
{
pwr_tUInt32 sts;
pwr_tStatus sts;
sStore *sp;
LstHead(sStore) *sl;
sNode *np;
......@@ -263,8 +263,8 @@ Init ()
LstIni(&lHelCB.StoreL);
lHelCB.Tree = tree_CreateTable(sizeof(pwr_tNodeId), offsetof(sNode, Nid),
sizeof(sNode), 10, tree_eComp_nid, NULL);
lHelCB.Tree = tree_CreateTable(&sts, sizeof(pwr_tNodeId), offsetof(sNode, Nid),
sizeof(sNode), 10, tree_Comp_nid);
if (lHelCB.Tree == NULL)
Log_Error_Exit(MH__NOSPACE, "Couldn't allocate tree.");
......@@ -314,9 +314,10 @@ Insert (
LstLink(sStore) *sl;
int ctime;
pwr_tVaxTime BirthVaxTime;
pwr_tStatus sts;
np = tree_Find(lHelCB.Tree, &ip->Id.Nix);
np = tree_Find(&sts, lHelCB.Tree, &ip->Id.Nix);
if (np == NULL)
np = InsertNode((pwr_tNodeId)ip->Id.Nix);
......@@ -348,11 +349,12 @@ static sNode *
InsertNode (
pwr_tNodeId Nid
) {
pwr_tStatus sts;
sNode *np;
pwr_tVaxTime BirthVaxTime;
struct SQLCA sqlca;
np = tree_Insert(lHelCB.Tree, &Nid);
np = tree_Insert(&sts, lHelCB.Tree, &Nid);
np->Nid = Nid;
mh_HeldbSetTxro(&sqlca);
......
......@@ -26,6 +26,7 @@
#include "rt_lst.h"
#include "rt_errh.h"
#include "rt_syi.h"
#include "rt_load.h"
#if defined OS_VMS
# define cPrio_neth 8
......
......@@ -10,4 +10,5 @@ pwr_lib:libpwr_rt/lib
pwr_lib:libpwr_co/lib
pwr_obj:pwr_msg_co.obj
pwr_obj:pwr_msg_rt.obj
ucx$rpc:ucx$rpcxdr/lib
sys$library:decc$shr/share
......@@ -45,7 +45,9 @@
# endif
#endif
#if defined OS_VMS && defined __cplusplus
namespace std {};
#endif
#define pwr_dLittleEndian 1
#define pwr_dBigEndian 2
......@@ -156,7 +158,7 @@ typedef struct {
int high;
} pwr_tVaxTime;
#if defined OS_VMS && ! defined _TIMESPEC_T_
#if (defined OS_VMS || defined OS_ELN) && (! defined _TIMESPEC_T_ && !defined TIMERS_INCLUDED)
# define _TIMESPEC_T_
typedef struct timespec {
unsigned long tv_sec;
......
......@@ -6,6 +6,12 @@
. */
#if defined OS_ELN
#include string
#include unistd
#include types
#include errno
#else
#include <string.h>
#include <unistd.h>
#include <sys/mman.h>
......@@ -13,6 +19,7 @@
#include <sys/stat.h>
#include <errno.h>
#include <fcntl.h>
#endif
#include "pwr.h"
#include "co_dbs.h"
......
......@@ -154,8 +154,11 @@ co_vaxf2ieee(co_eBO sbo,
else
v.i = *(int *)sp;
(char *)i3ep = tp;
#if (pwr_dHost_byteOrder == pwr_dLittleEndian)
i3ep = (union i3e_s_le *) tp;
#else
i3ep = (union i3e_s_be *) tp;
#endif
if (v.b.f22_16 == 0x7f && v.b.exp == 0xff && v.b.f15_0 == 0xffff) { /* High value. */
i3ep->i = 0, i3ep->v.exp = 0xff;
......@@ -196,7 +199,11 @@ co_ieee2vaxf(co_eBO sbo,
else
i3e.i = *(int *)sp;
(int *)vp = tp;
#if (pwr_dHost_byteOrder == pwr_dLittleEndian)
vp = (union vax_f_le *) tp;
#else
vp = (union vax_f_be *) tp;
#endif
if (i3e.b.f22_0 == 0x0 && i3e.b.exp == 0xff) { /* High value. */
vp->b.f22_16 = 0x7f;
......
......@@ -52,7 +52,7 @@ class Lng {
static char *translate( char *str);
static int translate( char *in, char *out);
static char *get_language_str();
static void Lng::get_uid( char *in, char *out);
static void get_uid( char *in, char *out);
};
#if defined __cplusplus
......
......@@ -5,14 +5,20 @@
This module contains the PDR-routines */
#if defined OS_ELN
#include string
#else
#include <string.h>
#endif
#include "co_pdr.h"
#include "co_float.h"
#if defined OS_ELN
#include in
#else
#include <netinet/in.h>
#endif
......
#ifndef co_pdr_h
#define co_pdr_h
#if defined OS_VMS
#include <types.h>
#elif defined OS_ELN
#include <rpc/rpc.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif
......
......@@ -24,6 +24,7 @@
#include "rt_qdb_msg.h"
#include "rt_qcom_msg.h"
#include "rt_qdb.h"
#include "rt_errh.h"
typedef struct {
qdb_sQue *qp;
......
......@@ -173,7 +173,7 @@ cvolc_GetObjectInfo (
if (tbl == NULL)
errh_Bugcheck(*sts, "failed getting address for conversion table");
}
ndc_ConvertRemoteToNativeDataTable(sts, ccp, tbl, rarp,
ndc_ConvertRemoteToNativeTable(sts, ccp, tbl, rarp,
arp, p, rmp->info, size);
} else {
......
......@@ -116,7 +116,7 @@ static char *get_name (char*, int);
static char get_severity (pwr_tStatus);
static void openLog ();
static void set_name (char*);
static void send (char*);
static void errh_send (char*);
static void log_message (errh_sLog*, char, char*, va_list);
static int msg_vsprintf (char *, const char *, aa_list, va_list);
......@@ -204,7 +204,7 @@ errh_Log (
if (interactive)
printf("%s\n", buff);
else
send(buff);
errh_send(buff);
return buff;
}
......@@ -434,7 +434,7 @@ errh_CErrLog (
s = get_header(get_severity(sts), string);
msg_vsprintf(s, msg, args, NULL);
send(string);
errh_send(string);
}
/* Format a string. */
......@@ -669,7 +669,7 @@ log_message (errh_sLog *lp, char severity, char *msg, va_list ap)
if (interactive)
printf("%s\n", string);
else
send(string);
errh_send(string);
if (lp != NULL && lp->send) {
lp->put.data = string;
......@@ -1026,7 +1026,7 @@ number (
}
static void
send (char *s)
errh_send (char *s)
{
int len = strlen(s);
......
......@@ -494,13 +494,14 @@ typedef struct {
gdb_sCcVolKey key; /**< Hash table key */
pwr_tTime time; /**< Time for the class volume */
pwr_tBoolean equalClasses; /**< True if the cached volume has the same versions as the local */
// gdb_sTouchQ ccache; /**< The cache of classes */
/* gdb_sTouchQ ccache; */ /**< The cache of classes */
} gdb_sCclassVolume;
#if 0
/** Cached Attribute
*/
#if 0
typedef struct {
} ndc_sAttribute;
......@@ -510,7 +511,7 @@ typedef struct {
typedef struct {
net_sCattribute g;
// ndc_sAttribute conv;
/* ndc_sAttribute conv; */
} gdb_sCattribute;
......
......@@ -2319,7 +2319,7 @@ gdh_SubData (
tbl = pool_Address(NULL, gdbroot->pool, ccp->rnConv);
if (tbl == NULL)errh_Bugcheck(GDH__WEIRD, "gdh_SubData, get cached class address");
ndc_ConvertRemoteToNativeDataTable(&sts, ccp, tbl, &cp->raref, &cp->aref, bp, p, MIN(bsize, cp->aref.Size));
ndc_ConvertRemoteToNativeTable(&sts, ccp, tbl, &cp->raref, &cp->aref, bp, p, MIN(bsize, cp->aref.Size));
} else
memcpy(bp, p, MIN(bsize, cp->aref.Size));
......
......@@ -30,6 +30,7 @@
#include "rt_net.h"
#include "rt_sub.h"
#include "rt_dvms.h"
#include "co_time.h"
static dvmsFctn *convFctn = NULL;
......@@ -288,7 +289,7 @@ updateObject (
}
op->u.n.flags.b.isMountClean = o->flags.b.isMountClean;
// op->u.n.rbTime = o->rbody.time;
/* op->u.n.rbTime = o->rbody.time; */
op->u.n.time = o->time;
op->u.n.lflags.m = o->flags.m;
......@@ -575,7 +576,7 @@ ivol_LoadObject (
if (vol_LinkObject(sts, lv->vp, op, ilink) == NULL)
return NULL;
op->u.n.flags.b.isMountClean = o->flags.b.isMountClean;
// op->u.n.rbTime = o->rbody.time;
/* op->u.n.rbTime = o->rbody.time; */
op->u.n.time = o->time;
op->u.n.lflags.m = o->flags.m;
return op;
......
......@@ -743,7 +743,7 @@ ndc_ConvertNativeToRemoteData (
adef.b.privatepointer = 1;
if (!conv_Fctn[cidx](cap->elem, tasize, tp + cap->offs, &size, ap->elem, sasize, sp + ap->offs, adef)) {
if (!conv_Fctn[cidx](cap->elem, tasize, (char *)tp + cap->offs, (int *)&size, ap->elem, sasize, (const char *)sp + ap->offs, adef)) {
pwr_Return(NO, sts, NDC__CONVERT);
}
break;
......@@ -751,7 +751,7 @@ ndc_ConvertNativeToRemoteData (
}
if (j >= cp->acount) {/* the remote attribute doesn't exist locally */
if (!conv_Fctn[conv_eIdx_zero](cap->elem, tasize, tp + cap->offs, &size, 0, 0, 0, adef)) {
if (!conv_Fctn[conv_eIdx_zero](cap->elem, tasize, (char *)tp + cap->offs, (int *)&size, 0, 0, 0, adef)) {
pwr_Return(NO, sts, NDC__CONVERT);
}
}
......@@ -781,7 +781,7 @@ ndc_ConvertNativeToRemoteData (
adef.b.privatepointer = 1;
if (!conv_Fctn[cidx](cap->elem, tasize, tp, &size,
if (!conv_Fctn[cidx](cap->elem, tasize, tp, (int *)&size,
nap->elem, sasize, sp, adef)
) {
pwr_Return(NO, sts, NDC__CONVERT);
......@@ -915,14 +915,14 @@ ndc_ConvertRemoteToNativeData (
adef.m = cap->flags.m;
adef.b.privatepointer = 1;
if (!conv_Fctn[cidx](ap->elem, tasize, tp, &size, cap->elem, sasize, sp, adef)) {
if (!conv_Fctn[cidx](ap->elem, tasize, tp, (int *)&size, cap->elem, sasize, sp, adef)) {
pwr_Return(NO, sts, NDC__CONVERT);
}
}
}
if (j >= ccp->acount) {/* the native attribute doesn't exist remotely */
if (!conv_Fctn[cidx](ap->elem, tasize, tp, &size, 0, 0, 0, adef)) {
if (!conv_Fctn[cidx](ap->elem, tasize, tp, (int *)&size, 0, 0, 0, adef)) {
pwr_Return(NO, sts, NDC__CONVERT);
}
}
......@@ -953,7 +953,7 @@ ndc_ConvertRemoteToNativeData (
adef.b.privatepointer = 1;
if (!conv_Fctn[cidx](nap->elem, tasize, tp, &size,
if (!conv_Fctn[cidx](nap->elem, tasize, tp, (int *)&size,
cap->elem, sasize, sp, adef)
) {
pwr_Return(NO, sts, NDC__CONVERT);
......@@ -969,7 +969,7 @@ ndc_ConvertRemoteToNativeData (
* The data has already been converted to native data format
*/
pwr_tBoolean
ndc_ConvertRemoteToNativeDataTable (
ndc_ConvertRemoteToNativeTable (
pwr_tStatus *sts,
const gdb_sCclass *ccp, /**< Cached class */
const ndc_sRemoteToNative *tbl,
......@@ -1067,7 +1067,7 @@ ndc_ConvertRemoteToNativeDataTable (
if(!conv_Fctn[cidx](ap->elem, ap->size/ap->elem, (char *)tp + (ap->offs - base), &size,
if(!conv_Fctn[cidx](ap->elem, ap->size/ap->elem, (char *)tp + (ap->offs - base), (int *)&size,
relem, cap->size/cap->elem, (const char *)sp + roffs, adef))
pwr_Return(NO, sts, NDC__CONVERT);
......
......@@ -39,7 +39,7 @@ typedef enum {
typedef struct {
conv_eIdx cidx; /**< Index in the conversion routine table */
pwr_tUInt32 raidx; /**< Native attribute index */
// pwr_tBoolean private;/**< Set if attribute is a private pointer */
/* pwr_tBoolean private; */ /**< Set if attribute is a private pointer */
} ndc_sRemoteToNative;
......@@ -113,7 +113,7 @@ ndc_ConvertRemoteToNativeData (
* The data has already been converted to native data format
*/
pwr_tBoolean
ndc_ConvertRemoteToNativeDataTable (
ndc_ConvertRemoteToNativeTable (
pwr_tStatus *sts,
const gdb_sCclass *ccp, /**< Cached class */
const ndc_sRemoteToNative *tbl,
......
......@@ -1070,7 +1070,7 @@ struct net_sGetGclass {
%
% if (EVEN(sts)) {
% acntmsg = 0;
% if (!xdr_pwr_tUInt32(xdrs, &acntmsg)) {
% if (!xdr_pwr_tUInt32(xdrs, (unsigned int *)&acntmsg)) {
% return (FALSE);
% }
% return (TRUE);
......@@ -1191,7 +1191,7 @@ struct net_sGetCclass {
%
% if (EVEN(sts) || equal) {
% acntmsg = 0;
% if (!xdr_pwr_tUInt32(xdrs, &acntmsg)) {
% if (!xdr_pwr_tUInt32(xdrs, (unsigned int *)&acntmsg)) {
% return (FALSE);
% }
% return (TRUE);
......
......@@ -22,7 +22,6 @@
#define EVEN(a) (((int)(a) & 1) == 0)
#define max(Dragon,Eagle) ((Dragon) > (Eagle) ? (Dragon) : (Eagle))
#define min(Dragon,Eagle) ((Dragon) < (Eagle) ? (Dragon) : (Eagle))
#define abs(Dragon) ((Dragon) >= 0 ? (Dragon) : (-(Dragon)))
typedef struct {
pwr_tFloat32 *DataP;
......
......@@ -601,7 +601,7 @@ qcom_Init (
#elif defined OS_VMS
atexit(exitHandler);
*sts = lib$get_ef(&qdb->ap->ef);
if (EVEN(*sts)) pwr_Bugcheck(sts, "lib$get_ef()");
if (EVEN(*sts)) errh_Bugcheck(sts, "lib$get_ef()");
#endif
qdb_ScopeLock {
......
......@@ -207,7 +207,7 @@ subcm_Data (
if (cp->cclass == pool_cNRef)
memcpy(adrs, dp->data, MIN(dp->size, cp->usersize));
else if (!cp->old) {
ndc_ConvertRemoteToNativeDataTable(&cp->sts, ccp, tbl, &cp->raref, &cp->aref, adrs, dp->data, cp->usersize);
ndc_ConvertRemoteToNativeTable(&cp->sts, ccp, tbl, &cp->raref, &cp->aref, adrs, dp->data, cp->usersize);
if (EVEN(cp->sts))
cp->old = TRUE;
}
......
......@@ -14,12 +14,12 @@
#endif
typedef struct s_commonpart
typedef struct
{
void *parent_ctx;
Widget parent_wid;
char *name;
} trace_t_commonpart, *commonpart;
} trace_t_commonpart;
typedef struct tra_sCtx *tra_tCtx;
typedef struct trace_s_node trace_t_node;
......
......@@ -27,6 +27,7 @@ endif
vpath %.h $(hw_source):$(os_source):$(co_source)
vpath %.c $(hw_source):$(os_source):$(co_source)
vpath %.x $(hw_source):$(os_source):$(co_source)
vpath %.pdr $(hw_source):$(os_source):$(co_source)
source_dirs = $(hw_source) $(os_source) $(co_source)
......@@ -58,16 +59,29 @@ xdr_sources := $(sort \
) \
)
pdr_sources := $(sort \
$(foreach file, \
$(foreach dir, \
$(source_dirs), \
$(wildcard $(dir)/$(comp_name)*.pdr) \
), $(notdir $(file)) \
) \
)
xdr_includes := $(addprefix $(inc_dir)/,$(patsubst %.x, %.h, $(xdr_sources)))
xdr_objects := $(patsubst %.x, %_xdr.obj, $(xdr_sources))
pdr_includes := $(addprefix $(inc_dir)/,$(patsubst %.pdr, %.h, $(pdr_sources)))
pdr_objects := $(patsubst %.pdr, %_pdr.obj, $(pdr_sources))
export_includes := $(addprefix $(inc_dir)/, $(includes))
export_includes += $(xdr_includes)
export_includes += $(xdr_includes) $(pdr_includes)
clean_includes := $(patsubst %.h, clean_%.h, $(includes))
objects := $(addsuffix $(obj_ext), $(basename $(c_sources)))
objects += $(xdr_objects)
objects += $(xdr_objects) $(pdr_objects)
source_dependencies := $(notdir $(basename $(c_sources)))
source_dependencies := $(addprefix $(bld_dir)/, $(source_dependencies))
......
......@@ -142,6 +142,19 @@ $(inc_dir)/%.h : %.x
@ if f$$search("$(to-vms $(tmp_dir)/$(tname).h)") .nes. "" then $(rm) $(rmflags) $(to-vms $(tmp_dir)/$(tname).h);*
@ set def 'saved_def
$(inc_dir)/%.h : %.pdr
@ $(log_x_h)
tools_pdrgen -h -o $(target) $(source)
(%_pdr.obj) : %.pdr
@ $(log_x_lib)
@ tools_pdrgen -c -o $(to-vms $(bld_dir)/$(sname)_pdr.c) $(source)
@ \@pwrb_root:[os_vms.hw_vax.exp.exe]pwr_repl $(to-vms $(bld_dir)/$(sname)_pdr.c) "[.-.-]$(sname)" "$(sname)"
@ $(cc) $(cflags) $(csetos) $(cinc) $(clibobj) $(clis) $(to-vms $(bld_dir)/$(sname)_pdr.c)
@ $(pur) $(purflags) $(to-vms $(bld_dir)/$(sname)_pdr.c)
@ $(ar) $(arflags) $(to-vms $(export_lib)) $(libobj)
@ if f$$search("$(libobj)") .nes. "" then $(rm) $(rmflags) $(libobj);*
(%_xdr.obj) : %.x
@ $(log_x_lib)
@ saved_def = f$$environment("default")
......@@ -182,8 +195,8 @@ $(inc_dir)/%.h : %.msg
@ $(ar) $(arflags) $(to-vms $(export_lib)) 'objname'
@ mc pwr_exe:pwr_msggen 'objname' $(target)
@ if f$$search(objname) .nes. "" then $(rm) 'objname';*
#.msg.h
# @ $(msghlog)
# @ objname = "pwr_inc:"+f$$parse("$(target_name)",,,"NAME")+".obj"
......
......@@ -99,7 +99,7 @@ xdr_includes := $(addprefix $(inc_dir)/,$(patsubst %.x, %.h, $(xdr_sources)))
xdr_objects := $(patsubst %.x, %_xdr.obj, $(xdr_sources))
pdr_includes := $(addprefix $(inc_dir)/,$(patsubst %.pdr, %.h, $(pdr_sources)))
pdr_objects := $(patsubst %.pdr, %_pdr.o, $(pdr_sources))
pdr_objects := $(patsubst %.pdr, %_pdr.obj, $(pdr_sources))
export_includes := $(addprefix $(inc_dir)/, $(includes))
export_includes += $(xdr_includes) $(pdr_includes)
......
......@@ -185,12 +185,13 @@ $(inc_dir)/%.hpp : %.hpp
$(inc_dir)/%.h : %.pdr
@ $(log_x_h)
@ tools_pdrgen -h -o $(target) $(source)
tools_pdrgen -h -o $(target) $(source)
(%_pdr.obj) : %.pdr
@ $(log_x_lib)
@ tools_pdrgen -c -o $(bld_dir)/$(sname)_pdr.c $(source)
@ $(cc)/warn=dis=TRAILCOMMA $(cflags) $(csetos) $(cinc) $(clibobj) $(clis) $(to-vms $(bld_dir)/$(sname)_pdr.c)
tools_pdrgen -c -o $(to-vms $(bld_dir)/$(sname)_pdr.c) $(source)
\@pwr_exe:pwr_repl $(to-vms $(bld_dir)/$(sname)_pdr.c) "[.-.-]$(sname)" "$(sname)"
$(cc)/warn=dis=TRAILCOMMA $(cflags) $(csetos) $(cinc) $(clibobj) $(clis) $(to-vms $(bld_dir)/$(sname)_pdr.c)
@ $(pur) $(purflags) $(to-vms $(bld_dir)/$(sname)_pdr.c)
@ $(ar) $(arflags) $(to-vms $(export_lib)) $(libobj)
@ if f$$search("$(libobj)") .nes. "" then $(rm) $(rmflags) $(libobj);*
......
......@@ -86,7 +86,7 @@ static char CPP[] = "cl";
static char CPPFLAGS[] = "/C /EP /nologo";
#elif defined OS_VMS
static char CPP[] = "cc";
static char CPPFLAGS[] = "/prep=";
static char CPPFLAGS[] = "/decc/prep=";
#else
static char CPP[] = "/lib/cpp";
static char CPPFLAGS[] = "-C";
......@@ -205,7 +205,11 @@ int main(int argc,
}
#endif
#ifdef OS_VMS
exit(1);
#else
exit(0);
#endif
}
/*
......
......@@ -917,7 +917,11 @@ ldh_ObjidToName(ldh_tSession session, pwr_tOid oid, ldh_eName type, char *buf, i
case ldh_eName_Object:
{
wb_object o = sp->object(oid);
if (!o) return o.sts();
if (!o) { /* return o.sts(); */
strncpy( buf, cdh_ObjidToString( NULL, oid, 1), maxsize);
*size = strlen( buf);
return LDH__SUCCESS;
}
try {
char name[200];
......@@ -938,8 +942,11 @@ ldh_ObjidToName(ldh_tSession session, pwr_tOid oid, ldh_eName type, char *buf, i
case ldh_eName_Volume:
{
wb_object o = sp->object(oid);
if (!o) return o.sts();
if (!o) { /* return o.sts(); */
strncpy( buf, cdh_ObjidToString( NULL, oid, 1), maxsize);
*size = strlen( buf);
return LDH__SUCCESS;
}
try {
char name[200];
strcpy( name, o.longName().name( type));
......
......@@ -8,7 +8,7 @@
#ifndef wb_print_wbl_h
#define wb_print_wbl_h
#include <iostream>
#include <iostream.h>
#include "pwr_class.h"
......
......@@ -357,6 +357,8 @@ void wb_vrepdb::adopt(wb_db_txn *txn, wb_db_ohead &o, wb_destination &dest)
o.boid(d.boid());
o.aoid(d.oid());
break;
default:
;
}
if (o.boid().vid != pwr_cNVid) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment