Commit 3e7f9be0 authored by Claes Sjofors's avatar Claes Sjofors

Crossreference window and method in wtt

parent d11ac498
...@@ -220,6 +220,12 @@ SObject pwrs:Class ...@@ -220,6 +220,12 @@ SObject pwrs:Class
EndObject EndObject
Object ConfiguratorPascn $Menu Object ConfiguratorPascn $Menu
Object Pointed $Menu Object Pointed $Menu
Object Crossreferences $MenuButton
Body SysBody
Attr ButtonName = "Crossreferences"
Attr MethodName = "$Object-Crossreferences"
EndBody
EndObject
Object HelpClass $MenuButton Object HelpClass $MenuButton
Body SysBody Body SysBody
Attr ButtonName = "Help Class" Attr ButtonName = "Help Class"
...@@ -231,6 +237,12 @@ SObject pwrs:Class ...@@ -231,6 +237,12 @@ SObject pwrs:Class
EndObject EndObject
Object ConfiguratorPasos $Menu Object ConfiguratorPasos $Menu
Object Pointed $Menu Object Pointed $Menu
Object Crossreferences $MenuButton
Body SysBody
Attr ButtonName = "Crossreferences"
Attr MethodName = "$Object-Crossreferences"
EndBody
EndObject
Object HelpClass $MenuButton Object HelpClass $MenuButton
Body SysBody Body SysBody
Attr ButtonName = "Help Class" Attr ButtonName = "Help Class"
...@@ -242,6 +254,12 @@ SObject pwrs:Class ...@@ -242,6 +254,12 @@ SObject pwrs:Class
EndObject EndObject
Object ConfiguratorPasas $Menu Object ConfiguratorPasas $Menu
Object Pointed $Menu Object Pointed $Menu
Object Crossreferences $MenuButton
Body SysBody
Attr ButtonName = "Crossreferences"
Attr MethodName = "$Object-Crossreferences"
EndBody
EndObject
Object HelpClass $MenuButton Object HelpClass $MenuButton
Body SysBody Body SysBody
Attr ButtonName = "Help Class" Attr ButtonName = "Help Class"
...@@ -267,6 +285,12 @@ SObject pwrs:Class ...@@ -267,6 +285,12 @@ SObject pwrs:Class
Attr FilterName = "$Attribute-InsertSelectedObjectFilter" Attr FilterName = "$Attribute-InsertSelectedObjectFilter"
EndBody EndBody
EndObject EndObject
Object Crossreferences $MenuButton
Body SysBody
Attr ButtonName = "Crossreferences"
Attr MethodName = "$Object-Crossreferences"
EndBody
EndObject
Object HelpClass $MenuButton Object HelpClass $MenuButton
Body SysBody Body SysBody
Attr ButtonName = "Help Class" Attr ButtonName = "Help Class"
...@@ -285,6 +309,12 @@ SObject pwrs:Class ...@@ -285,6 +309,12 @@ SObject pwrs:Class
Attr FilterName = "$Attribute-InsertSelectedObjectFilter" Attr FilterName = "$Attribute-InsertSelectedObjectFilter"
EndBody EndBody
EndObject EndObject
Object Crossreferences $MenuButton
Body SysBody
Attr ButtonName = "Crossreferences"
Attr MethodName = "$Object-Crossreferences"
EndBody
EndObject
Object HelpClass $MenuButton Object HelpClass $MenuButton
Body SysBody Body SysBody
Attr ButtonName = "Help Class" Attr ButtonName = "Help Class"
...@@ -296,6 +326,12 @@ SObject pwrs:Class ...@@ -296,6 +326,12 @@ SObject pwrs:Class
EndObject EndObject
Object ConfiguratorPasmn $Menu Object ConfiguratorPasmn $Menu
Object Pointed $Menu Object Pointed $Menu
Object Crossreferences $MenuButton
Body SysBody
Attr ButtonName = "Crossreferences"
Attr MethodName = "$Object-Crossreferences"
EndBody
EndObject
Object HelpClass $MenuButton Object HelpClass $MenuButton
Body SysBody Body SysBody
Attr ButtonName = "Help Class" Attr ButtonName = "Help Class"
...@@ -307,6 +343,12 @@ SObject pwrs:Class ...@@ -307,6 +343,12 @@ SObject pwrs:Class
EndObject EndObject
Object ConfiguratorPasms $Menu Object ConfiguratorPasms $Menu
Object Pointed $Menu Object Pointed $Menu
Object Crossreferences $MenuButton
Body SysBody
Attr ButtonName = "Crossreferences"
Attr MethodName = "$Object-Crossreferences"
EndBody
EndObject
Object HelpClass $MenuButton Object HelpClass $MenuButton
Body SysBody Body SysBody
Attr ButtonName = "Help Class" Attr ButtonName = "Help Class"
...@@ -318,6 +360,12 @@ SObject pwrs:Class ...@@ -318,6 +360,12 @@ SObject pwrs:Class
EndObject EndObject
Object NavigatorPasnn $Menu Object NavigatorPasnn $Menu
Object Pointed $Menu Object Pointed $Menu
Object Crossreferences $MenuButton
Body SysBody
Attr ButtonName = "Crossreferences"
Attr MethodName = "$Object-Crossreferences"
EndBody
EndObject
Object HelpClass $MenuButton Object HelpClass $MenuButton
Body SysBody Body SysBody
Attr ButtonName = "Help Class" Attr ButtonName = "Help Class"
...@@ -329,6 +377,12 @@ SObject pwrs:Class ...@@ -329,6 +377,12 @@ SObject pwrs:Class
EndObject EndObject
Object NavigatorPasos $Menu Object NavigatorPasos $Menu
Object Pointed $Menu Object Pointed $Menu
Object Crossreferences $MenuButton
Body SysBody
Attr ButtonName = "Crossreferences"
Attr MethodName = "$Object-Crossreferences"
EndBody
EndObject
Object HelpClass $MenuButton Object HelpClass $MenuButton
Body SysBody Body SysBody
Attr ButtonName = "Help Class" Attr ButtonName = "Help Class"
...@@ -340,6 +394,12 @@ SObject pwrs:Class ...@@ -340,6 +394,12 @@ SObject pwrs:Class
EndObject EndObject
Object NavigatorPason $Menu Object NavigatorPason $Menu
Object Pointed $Menu Object Pointed $Menu
Object Crossreferences $MenuButton
Body SysBody
Attr ButtonName = "Crossreferences"
Attr MethodName = "$Object-Crossreferences"
EndBody
EndObject
Object HelpClass $MenuButton Object HelpClass $MenuButton
Body SysBody Body SysBody
Attr ButtonName = "Help Class" Attr ButtonName = "Help Class"
...@@ -351,6 +411,12 @@ SObject pwrs:Class ...@@ -351,6 +411,12 @@ SObject pwrs:Class
EndObject EndObject
Object NavigatorPasas $Menu Object NavigatorPasas $Menu
Object Pointed $Menu Object Pointed $Menu
Object Crossreferences $MenuButton
Body SysBody
Attr ButtonName = "Crossreferences"
Attr MethodName = "$Object-Crossreferences"
EndBody
EndObject
Object HelpClass $MenuButton Object HelpClass $MenuButton
Body SysBody Body SysBody
Attr ButtonName = "Help Class" Attr ButtonName = "Help Class"
...@@ -362,6 +428,12 @@ SObject pwrs:Class ...@@ -362,6 +428,12 @@ SObject pwrs:Class
EndObject EndObject
Object NavigatorPasan $Menu Object NavigatorPasan $Menu
Object Pointed $Menu Object Pointed $Menu
Object Crossreferences $MenuButton
Body SysBody
Attr ButtonName = "Crossreferences"
Attr MethodName = "$Object-Crossreferences"
EndBody
EndObject
Object HelpClass $MenuButton Object HelpClass $MenuButton
Body SysBody Body SysBody
Attr ButtonName = "Help Class" Attr ButtonName = "Help Class"
...@@ -373,6 +445,12 @@ SObject pwrs:Class ...@@ -373,6 +445,12 @@ SObject pwrs:Class
EndObject EndObject
Object NavigatorPasmn $Menu Object NavigatorPasmn $Menu
Object Pointed $Menu Object Pointed $Menu
Object Crossreferences $MenuButton
Body SysBody
Attr ButtonName = "Crossreferences"
Attr MethodName = "$Object-Crossreferences"
EndBody
EndObject
Object HelpClass $MenuButton Object HelpClass $MenuButton
Body SysBody Body SysBody
Attr ButtonName = "Help Class" Attr ButtonName = "Help Class"
...@@ -384,6 +462,12 @@ SObject pwrs:Class ...@@ -384,6 +462,12 @@ SObject pwrs:Class
EndObject EndObject
Object NavigatorPasms $Menu Object NavigatorPasms $Menu
Object Pointed $Menu Object Pointed $Menu
Object Crossreferences $MenuButton
Body SysBody
Attr ButtonName = "Crossreferences"
Attr MethodName = "$Object-Crossreferences"
EndBody
EndObject
Object HelpClass $MenuButton Object HelpClass $MenuButton
Body SysBody Body SysBody
Attr ButtonName = "Help Class" Attr ButtonName = "Help Class"
...@@ -395,6 +479,12 @@ SObject pwrs:Class ...@@ -395,6 +479,12 @@ SObject pwrs:Class
EndObject EndObject
Object ConfiguratorPxsxx $Menu Object ConfiguratorPxsxx $Menu
Object Pointed $Menu Object Pointed $Menu
Object Crossreferences $MenuButton
Body SysBody
Attr ButtonName = "Crossreferences"
Attr MethodName = "$Object-Crossreferences"
EndBody
EndObject
Object HelpClass $MenuButton Object HelpClass $MenuButton
Body SysBody Body SysBody
Attr ButtonName = "Help Class" Attr ButtonName = "Help Class"
...@@ -406,6 +496,12 @@ SObject pwrs:Class ...@@ -406,6 +496,12 @@ SObject pwrs:Class
EndObject EndObject
Object NavigatorPxsxx $Menu Object NavigatorPxsxx $Menu
Object Pointed $Menu Object Pointed $Menu
Object Crossreferences $MenuButton
Body SysBody
Attr ButtonName = "Crossreferences"
Attr MethodName = "$Object-Crossreferences"
EndBody
EndObject
Object HelpClass $MenuButton Object HelpClass $MenuButton
Body SysBody Body SysBody
Attr ButtonName = "Help Class" Attr ButtonName = "Help Class"
......
...@@ -148,6 +148,12 @@ SObject pwrs:Class ...@@ -148,6 +148,12 @@ SObject pwrs:Class
Attr MethodName = "$Object-DeleteObject" Attr MethodName = "$Object-DeleteObject"
EndBody EndBody
EndObject EndObject
Object Crossreferences $MenuButton
Body SysBody
Attr ButtonName = "Crossreferences"
Attr MethodName = "$Object-Crossreferences"
EndBody
EndObject
Object Help $MenuButton Object Help $MenuButton
Body SysBody Body SysBody
Attr ButtonName = "Help" Attr ButtonName = "Help"
...@@ -172,6 +178,12 @@ SObject pwrs:Class ...@@ -172,6 +178,12 @@ SObject pwrs:Class
Attr MethodName = "$Object-OpenObject" Attr MethodName = "$Object-OpenObject"
EndBody EndBody
EndObject EndObject
Object Crossreferences $MenuButton
Body SysBody
Attr ButtonName = "Crossreferences"
Attr MethodName = "$Object-Crossreferences"
EndBody
EndObject
Object Help $MenuButton Object Help $MenuButton
Body SysBody Body SysBody
Attr ButtonName = "Help" Attr ButtonName = "Help"
...@@ -239,6 +251,12 @@ SObject pwrs:Class ...@@ -239,6 +251,12 @@ SObject pwrs:Class
Attr MethodName = "$Object-OpenObject" Attr MethodName = "$Object-OpenObject"
EndBody EndBody
EndObject EndObject
Object Crossreferences $MenuButton
Body SysBody
Attr ButtonName = "Crossreferences"
Attr MethodName = "$Object-Crossreferences"
EndBody
EndObject
Object Delete $MenuButton Object Delete $MenuButton
Body SysBody Body SysBody
Attr ButtonName = "Delete Object" Attr ButtonName = "Delete Object"
...@@ -317,6 +335,12 @@ SObject pwrs:Class ...@@ -317,6 +335,12 @@ SObject pwrs:Class
Attr MethodName = "$Object-OpenObject" Attr MethodName = "$Object-OpenObject"
EndBody EndBody
EndObject EndObject
Object Crossreferences $MenuButton
Body SysBody
Attr ButtonName = "Crossreferences"
Attr MethodName = "$Object-Crossreferences"
EndBody
EndObject
Object Help $MenuButton Object Help $MenuButton
Body SysBody Body SysBody
Attr ButtonName = "Help" Attr ButtonName = "Help"
...@@ -466,6 +490,12 @@ SObject pwrs:Class ...@@ -466,6 +490,12 @@ SObject pwrs:Class
Attr MethodName = "$Object-OpenObject" Attr MethodName = "$Object-OpenObject"
EndBody EndBody
EndObject EndObject
Object Crossreferences $MenuButton
Body SysBody
Attr ButtonName = "Crossreferences"
Attr MethodName = "$Object-Crossreferences"
EndBody
EndObject
Object Help $MenuButton Object Help $MenuButton
Body SysBody Body SysBody
Attr ButtonName = "Help" Attr ButtonName = "Help"
...@@ -615,6 +645,12 @@ SObject pwrs:Class ...@@ -615,6 +645,12 @@ SObject pwrs:Class
Attr MethodName = "$Object-OpenObject" Attr MethodName = "$Object-OpenObject"
EndBody EndBody
EndObject EndObject
Object Crossreferences $MenuButton
Body SysBody
Attr ButtonName = "Crossreferences"
Attr MethodName = "$Object-Crossreferences"
EndBody
EndObject
Object Help $MenuButton Object Help $MenuButton
Body SysBody Body SysBody
Attr ButtonName = "Help" Attr ButtonName = "Help"
...@@ -693,6 +729,12 @@ SObject pwrs:Class ...@@ -693,6 +729,12 @@ SObject pwrs:Class
Attr MethodName = "$Object-OpenObject" Attr MethodName = "$Object-OpenObject"
EndBody EndBody
EndObject EndObject
Object Crossreferences $MenuButton
Body SysBody
Attr ButtonName = "Crossreferences"
Attr MethodName = "$Object-Crossreferences"
EndBody
EndObject
Object Help $MenuButton Object Help $MenuButton
Body SysBody Body SysBody
Attr ButtonName = "Help" Attr ButtonName = "Help"
...@@ -717,6 +759,12 @@ SObject pwrs:Class ...@@ -717,6 +759,12 @@ SObject pwrs:Class
Attr MethodName = "$Object-OpenObject" Attr MethodName = "$Object-OpenObject"
EndBody EndBody
EndObject EndObject
Object Crossreferences $MenuButton
Body SysBody
Attr ButtonName = "Crossreferences"
Attr MethodName = "$Object-Crossreferences"
EndBody
EndObject
Object Help $MenuButton Object Help $MenuButton
Body SysBody Body SysBody
Attr ButtonName = "Help" Attr ButtonName = "Help"
...@@ -741,6 +789,12 @@ SObject pwrs:Class ...@@ -741,6 +789,12 @@ SObject pwrs:Class
Attr MethodName = "$Object-OpenObject" Attr MethodName = "$Object-OpenObject"
EndBody EndBody
EndObject EndObject
Object Crossreferences $MenuButton
Body SysBody
Attr ButtonName = "Crossreferences"
Attr MethodName = "$Object-Crossreferences"
EndBody
EndObject
Object Help $MenuButton Object Help $MenuButton
Body SysBody Body SysBody
Attr ButtonName = "Help" Attr ButtonName = "Help"
...@@ -765,6 +819,12 @@ SObject pwrs:Class ...@@ -765,6 +819,12 @@ SObject pwrs:Class
Attr MethodName = "$Object-OpenObject" Attr MethodName = "$Object-OpenObject"
EndBody EndBody
EndObject EndObject
Object Crossreferences $MenuButton
Body SysBody
Attr ButtonName = "Crossreferences"
Attr MethodName = "$Object-Crossreferences"
EndBody
EndObject
Object Help $MenuButton Object Help $MenuButton
Body SysBody Body SysBody
Attr ButtonName = "Help" Attr ButtonName = "Help"
...@@ -789,6 +849,12 @@ SObject pwrs:Class ...@@ -789,6 +849,12 @@ SObject pwrs:Class
Attr MethodName = "$Object-OpenObject" Attr MethodName = "$Object-OpenObject"
EndBody EndBody
EndObject EndObject
Object Crossreferences $MenuButton
Body SysBody
Attr ButtonName = "Crossreferences"
Attr MethodName = "$Object-Crossreferences"
EndBody
EndObject
Object Help $MenuButton Object Help $MenuButton
Body SysBody Body SysBody
Attr ButtonName = "Help" Attr ButtonName = "Help"
...@@ -813,6 +879,12 @@ SObject pwrs:Class ...@@ -813,6 +879,12 @@ SObject pwrs:Class
Attr MethodName = "$Object-OpenObject" Attr MethodName = "$Object-OpenObject"
EndBody EndBody
EndObject EndObject
Object Crossreferences $MenuButton
Body SysBody
Attr ButtonName = "Crossreferences"
Attr MethodName = "$Object-Crossreferences"
EndBody
EndObject
Object Cast $MenuButton Object Cast $MenuButton
Body SysBody Body SysBody
Attr ButtonName = "Cast..." Attr ButtonName = "Cast..."
...@@ -851,6 +923,12 @@ SObject pwrs:Class ...@@ -851,6 +923,12 @@ SObject pwrs:Class
Attr MethodName = "$Object-OpenObject" Attr MethodName = "$Object-OpenObject"
EndBody EndBody
EndObject EndObject
Object Crossreferences $MenuButton
Body SysBody
Attr ButtonName = "Crossreferences"
Attr MethodName = "$Object-Crossreferences"
EndBody
EndObject
Object Help $MenuButton Object Help $MenuButton
Body SysBody Body SysBody
Attr ButtonName = "Help" Attr ButtonName = "Help"
......
...@@ -140,3 +140,4 @@ ...@@ -140,3 +140,4 @@
090902 cs plc Compile error for reference to disabled signal (not in template code). 090902 cs plc Compile error for reference to disabled signal (not in template code).
090909 cs wb Bugfix in Connect wb method, couldn't handle array element attributes. 090909 cs wb Bugfix in Connect wb method, couldn't handle array element attributes.
090909 cs wb Limitation of wb_load files in one directory changed from 500 to 1000. 090909 cs wb Limitation of wb_load files in one directory changed from 500 to 1000.
091020 cs wb New crossreference window and method in wtt.
\ No newline at end of file
...@@ -516,7 +516,7 @@ WAttGtk::WAttGtk( ...@@ -516,7 +516,7 @@ WAttGtk::WAttGtk(
parent_ctx = ((WNav *)parent_ctx)->parent_ctx; parent_ctx = ((WNav *)parent_ctx)->parent_ctx;
utility = ((WUtility *)parent_ctx)->utype; utility = ((WUtility *)parent_ctx)->utype;
wattnav = new WAttNavGtk( (void *)this, pane, "Plant", wattnav = new WAttNavGtk( (void *)this, wattnav_eType_Object, pane, "Plant",
ldhses, aref, wa_editmode, wa_advanced_user, ldhses, aref, wa_editmode, wa_advanced_user,
wa_display_objectname, utility, &brow_widget, &sts); wa_display_objectname, utility, &brow_widget, &sts);
((WAttNav *)wattnav)->message_cb = &WAtt::message_cb; ((WAttNav *)wattnav)->message_cb = &WAtt::message_cb;
......
...@@ -48,6 +48,7 @@ extern "C" { ...@@ -48,6 +48,7 @@ extern "C" {
// //
WAttNavGtk::WAttNavGtk( WAttNavGtk::WAttNavGtk(
void *wa_parent_ctx, void *wa_parent_ctx,
wattnav_eType wa_type,
GtkWidget *wa_parent_wid, GtkWidget *wa_parent_wid,
const char *wa_name, const char *wa_name,
ldh_tSesContext wa_ldhses, ldh_tSesContext wa_ldhses,
...@@ -58,7 +59,7 @@ WAttNavGtk::WAttNavGtk( ...@@ -58,7 +59,7 @@ WAttNavGtk::WAttNavGtk(
wb_eUtility wa_utility, wb_eUtility wa_utility,
GtkWidget **w, GtkWidget **w,
pwr_tStatus *status) : pwr_tStatus *status) :
WAttNav(wa_parent_ctx,wa_name,wa_ldhses,wa_aref,wa_editmode,wa_advanced_user, WAttNav(wa_parent_ctx,wa_type,wa_name,wa_ldhses,wa_aref,wa_editmode,wa_advanced_user,
wa_display_objectname,wa_utility,status), parent_wid(wa_parent_wid) wa_display_objectname,wa_utility,status), parent_wid(wa_parent_wid)
{ {
form_widget = scrolledbrowwidgetgtk_new( form_widget = scrolledbrowwidgetgtk_new(
......
...@@ -28,6 +28,7 @@ class WAttNavGtk : public WAttNav { ...@@ -28,6 +28,7 @@ class WAttNavGtk : public WAttNav {
public: public:
WAttNavGtk( WAttNavGtk(
void *wa_parent_ctx, void *wa_parent_ctx,
wattnav_eType wa_type,
GtkWidget *wa_parent_wid, GtkWidget *wa_parent_wid,
const char *wa_name, const char *wa_name,
ldh_tSesContext wa_ldhses, ldh_tSesContext wa_ldhses,
......
...@@ -53,6 +53,7 @@ extern "C" { ...@@ -53,6 +53,7 @@ extern "C" {
#include "wb_wda_gtk.h" #include "wb_wda_gtk.h"
#include "wb_foe_gtk.h" #include "wb_foe_gtk.h"
#include "wb_utl_gtk.h" #include "wb_utl_gtk.h"
#include "wb_xcrr_gtk.h"
#define max(Dragon,Eagle) ((Dragon) > (Eagle) ? (Dragon) : (Eagle)) #define max(Dragon,Eagle) ((Dragon) > (Eagle) ? (Dragon) : (Eagle))
#define min(Dragon,Eagle) ((Dragon) < (Eagle) ? (Dragon) : (Eagle)) #define min(Dragon,Eagle) ((Dragon) < (Eagle) ? (Dragon) : (Eagle))
...@@ -431,6 +432,11 @@ CoLogin *WNavGtk::login_new( const char *name, ...@@ -431,6 +432,11 @@ CoLogin *WNavGtk::login_new( const char *name,
return new CoLoginGtk( this, parent_wid, name, groupname, bc_success, bc_cancel, status); return new CoLoginGtk( this, parent_wid, name, groupname, bc_success, bc_cancel, status);
} }
WCrr *WNavGtk::wcrr_new( pwr_tAttrRef *aref, pwr_tStatus *status)
{
return new WCrrGtk( parent_wid, this, ldhses, aref, gbl.advanced_user, status);
}
void WNavGtk::wge_subwindow_loop( WGe *wge) void WNavGtk::wge_subwindow_loop( WGe *wge)
{ {
gtk_main(); gtk_main();
......
...@@ -77,7 +77,8 @@ class WNavGtk : public WNav { ...@@ -77,7 +77,8 @@ class WNavGtk : public WNav {
void logw_new( char *item, wlog_eCategory *categories, int show_item); void logw_new( char *item, wlog_eCategory *categories, int show_item);
CoLogin *login_new( const char *name, const char *groupname, CoLogin *login_new( const char *name, const char *groupname,
void (* bc_success)( void *), void (* bc_cancel)( void *), pwr_tStatus *status); void (* bc_success)( void *), void (* bc_cancel)( void *), pwr_tStatus *status);
WCrr *wcrr_new( pwr_tAttrRef *aref, pwr_tStatus *status);
static void trace_scan( WNavGtk *wnav); static void trace_scan( WNavGtk *wnav);
static void sel_lose_cb( GtkWidget *w, GdkEventSelection *event, static void sel_lose_cb( GtkWidget *w, GdkEventSelection *event,
gpointer data); gpointer data);
......
/*
* Proview $Id: xtt_xcrr_gtk.cpp,v 1.3 2008-05-29 14:59:25 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with the program, if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* xtt_xcrr_gtk.cpp -- Display object crossreferences */
#include "glow_std.h"
#include <stdio.h>
#include <stdlib.h>
#include <gtk/gtk.h>
#include "co_cdh.h"
#include "co_dcli.h"
#include "co_time.h"
#include "co_wow_gtk.h"
#include "rt_xnav_msg.h"
#include "flow.h"
#include "flow_browctx.h"
#include "flow_browapi.h"
#include "wb_xcrr_gtk.h"
#include "wb_utility.h"
#include "wb_wattnav_gtk.h"
#include "co_lng.h"
#include "rt_xatt_msg.h"
void WCrrGtk::activate_exit(GtkWidget *w, gpointer data)
{
WCrr *xcrr = (WCrr *)data;
if ( xcrr->close_cb)
(xcrr->close_cb)( xcrr->parent_ctx, (void *)xcrr);
else
delete xcrr;
}
void WCrrGtk::activate_openplc(GtkWidget *w, gpointer data)
{
// WCrr *xcrr = (WCrr *)data;
// xcrr->xcrrnav->start_trace();
}
void WCrrGtk::activate_help(GtkWidget *w, gpointer data)
{
// Not yet implemented
}
gboolean WCrrGtk::action_inputfocus( GtkWidget *w, GdkEvent *event, gpointer data)
{
WCrrGtk *xcrr = (WCrrGtk *)data;
if ( xcrr->focustimer.disabled())
return TRUE;
if ( xcrr->xcrrnav)
xcrr->xcrrnav->set_inputfocus();
xcrr->focustimer.disable( 400);
return FALSE;
}
void WCrrGtk::pop()
{
gtk_window_present( GTK_WINDOW(toplevel));
}
WCrrGtk::~WCrrGtk()
{
delete xcrrnav;
gtk_widget_destroy( toplevel);
}
static gint delete_event( GtkWidget *w, GdkEvent *event, gpointer data)
{
WCrrGtk *xcrr = (WCrrGtk *)data;
if ( xcrr->close_cb)
(xcrr->close_cb)( xcrr->parent_ctx, (void *)xcrr);
else
delete xcrr;
return FALSE;
}
static void destroy_event( GtkWidget *w, gpointer data)
{
}
WCrrGtk::WCrrGtk(
GtkWidget *xa_parent_wid,
void *xa_parent_ctx,
ldh_tSesContext xa_ldhses,
pwr_sAttrRef *xa_objar,
int xa_advanced_user,
int *xa_sts) :
WCrr( xa_parent_ctx, xa_objar, xa_advanced_user, xa_sts),
parent_wid(xa_parent_wid)
{
int sts;
char *namep;
int size;
pwr_tAName title;
*xa_sts = ldh_AttrRefToName( xa_ldhses, &objar, cdh_mNName, &namep, &size);
if ( EVEN(*xa_sts)) return;
strncpy( title, namep, sizeof(title));
toplevel = (GtkWidget *) g_object_new( GTK_TYPE_WINDOW,
"default-height", 420,
"default-width", 600,
"title", title,
NULL);
g_signal_connect( toplevel, "delete_event", G_CALLBACK(delete_event), this);
g_signal_connect( toplevel, "destroy", G_CALLBACK(destroy_event), this);
g_signal_connect( toplevel, "focus-in-event", G_CALLBACK(action_inputfocus), this);
CoWowGtk::SetWindowIcon( toplevel);
GtkWidget *vbox = gtk_vbox_new( FALSE, 0);
// Menu
// Accelerators
GtkAccelGroup *accel_g = (GtkAccelGroup *) g_object_new(GTK_TYPE_ACCEL_GROUP, NULL);
gtk_window_add_accel_group(GTK_WINDOW(toplevel), accel_g);
GtkMenuBar *menu_bar = (GtkMenuBar *) g_object_new(GTK_TYPE_MENU_BAR, NULL);
// File entry
GtkWidget *file_close = gtk_image_menu_item_new_from_stock(GTK_STOCK_CLOSE, accel_g);
g_signal_connect(file_close, "activate", G_CALLBACK(activate_exit), this);
GtkMenu *file_menu = (GtkMenu *) g_object_new( GTK_TYPE_MENU, NULL);
gtk_menu_shell_append(GTK_MENU_SHELL(file_menu), file_close);
GtkWidget *file = gtk_menu_item_new_with_mnemonic(CoWowGtk::translate_utf8("_File"));
gtk_menu_shell_append(GTK_MENU_SHELL(menu_bar), file);
gtk_menu_item_set_submenu(GTK_MENU_ITEM(file), GTK_WIDGET(file_menu));
// Functions entry
GtkWidget *functions_open_plc = gtk_menu_item_new_with_mnemonic( CoWowGtk::translate_utf8("Open _Program"));
g_signal_connect( functions_open_plc, "activate",
G_CALLBACK(activate_openplc), this);
gtk_widget_add_accelerator( functions_open_plc, "activate", accel_g,
'l', GdkModifierType(GDK_CONTROL_MASK),
GTK_ACCEL_VISIBLE);
GtkMenu *func_menu = (GtkMenu *) g_object_new( GTK_TYPE_MENU, NULL);
gtk_menu_shell_append(GTK_MENU_SHELL(func_menu), functions_open_plc);
GtkWidget *functions = gtk_menu_item_new_with_mnemonic(CoWowGtk::translate_utf8("_Functions"));
gtk_menu_shell_append(GTK_MENU_SHELL(menu_bar), functions);
gtk_menu_item_set_submenu(GTK_MENU_ITEM(functions), GTK_WIDGET(func_menu));
// Help entry
GtkWidget *help_help = gtk_image_menu_item_new_from_stock(GTK_STOCK_HELP, accel_g);
g_signal_connect(help_help, "activate", G_CALLBACK(activate_help), this);
GtkMenu *help_menu = (GtkMenu *) g_object_new( GTK_TYPE_MENU, NULL);
gtk_menu_shell_append(GTK_MENU_SHELL(help_menu), help_help);
GtkWidget *help = gtk_menu_item_new_with_mnemonic(CoWowGtk::translate_utf8("_Help"));
gtk_menu_shell_append(GTK_MENU_SHELL(menu_bar), help);
gtk_menu_item_set_submenu(GTK_MENU_ITEM(help), GTK_WIDGET(help_menu));
xcrrnav = new WAttNavGtk( (void *)this, wattnav_eType_CrossRef, vbox, "Plant", xa_ldhses,
objar, 0, xa_advanced_user, 1, wb_eUtility_AttributeEditor, &brow_widget,
&sts);
// xcrrnav->popup_menu_cb = &xcrr_popup_menu_cb;
// xcrrnav->start_trace_cb = &xcrr_start_trace_cb;
// xcrrnav->close_cb = &xcrr_close_cb;
gtk_box_pack_start( GTK_BOX(vbox), GTK_WIDGET(menu_bar), FALSE, FALSE, 0);
gtk_box_pack_end( GTK_BOX(vbox), GTK_WIDGET(brow_widget), TRUE, TRUE, 0);
gtk_container_add( GTK_CONTAINER(toplevel), vbox);
gtk_widget_show_all( toplevel);
*xa_sts = XATT__SUCCESS;
}
/*
* Proview $Id: xtt_xcrr_gtk.h,v 1.1 2007-01-04 08:29:32 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with the program, if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef wb_xcrr_gtk_h
#define wb_xcrr_gtk_h
/* wb_xcrr_gtk.h -- Object crossreferences */
#ifndef wb_ldh_h
# include "wb_ldh.h"
#endif
#ifndef wb_xcrr_h
# include "wb_xcrr.h"
#endif
#ifndef co_wow_gtk_h
# include "co_wow_gtk.h"
#endif
class WCrrGtk : public WCrr {
public:
WCrrGtk(
GtkWidget *xa_parent_wid,
void *xa_parent_ctx,
ldh_tSesContext xa_ldhses,
pwr_sAttrRef *xa_objar,
int xa_advanced_user,
int *xa_sts);
~WCrrGtk();
GtkWidget *parent_wid;
GtkWidget *brow_widget;
GtkWidget *form_widget;
GtkWidget *toplevel;
GtkWidget *xcrrnav_form;
CoWowFocusTimerGtk focustimer;
void pop();
static void activate_exit( GtkWidget *w, gpointer data);
static void activate_openplc( GtkWidget *w, gpointer data);
static void activate_help( GtkWidget *w, gpointer data);
static gboolean action_inputfocus( GtkWidget *w, GdkEvent *event, gpointer data);
};
#endif
...@@ -1061,6 +1061,31 @@ static pwr_tStatus HistoryFilter( ldh_sMenuCall *ip) ...@@ -1061,6 +1061,31 @@ static pwr_tStatus HistoryFilter( ldh_sMenuCall *ip)
return 1; return 1;
} }
//
// Crossreferences
//
static pwr_tStatus Crossreferences( ldh_sMenuCall *ip)
{
pwr_tStatus sts;
int size;
char *namep;
char cmd[600];
sts = ldh_AttrRefToName( ip->PointedSession, &ip->Pointed, cdh_mNName,
&namep, &size);
if ( EVEN(sts)) return sts;
sprintf( cmd, "cross/wind/name=%s", namep);
ip->wnav->command( cmd);
return 1;
}
static pwr_tStatus CrossreferencesFilter( ldh_sMenuCall *ip)
{
return 1;
}
pwr_dExport pwr_BindMethods($Object) = { pwr_dExport pwr_BindMethods($Object) = {
pwr_BindMethod(CreateObject), pwr_BindMethod(CreateObject),
...@@ -1090,6 +1115,8 @@ pwr_dExport pwr_BindMethods($Object) = { ...@@ -1090,6 +1115,8 @@ pwr_dExport pwr_BindMethods($Object) = {
pwr_BindMethod(BuildFilter), pwr_BindMethod(BuildFilter),
pwr_BindMethod(History), pwr_BindMethod(History),
pwr_BindMethod(HistoryFilter), pwr_BindMethod(HistoryFilter),
pwr_BindMethod(Crossreferences),
pwr_BindMethod(CrossreferencesFilter),
pwr_NullMethod pwr_NullMethod
}; };
......
...@@ -47,7 +47,8 @@ ...@@ -47,7 +47,8 @@
void WAttNav::message( char sev, const char *text) void WAttNav::message( char sev, const char *text)
{ {
(message_cb)( parent_ctx, sev, text); if ( message_cb)
(message_cb)( parent_ctx, sev, text);
} }
...@@ -56,6 +57,7 @@ void WAttNav::message( char sev, const char *text) ...@@ -56,6 +57,7 @@ void WAttNav::message( char sev, const char *text)
// //
WAttNav::WAttNav( WAttNav::WAttNav(
void *wa_parent_ctx, void *wa_parent_ctx,
wattnav_eType wa_type,
const char *wa_name, const char *wa_name,
ldh_tSesContext wa_ldhses, ldh_tSesContext wa_ldhses,
pwr_sAttrRef wa_aref, pwr_sAttrRef wa_aref,
...@@ -64,7 +66,7 @@ WAttNav::WAttNav( ...@@ -64,7 +66,7 @@ WAttNav::WAttNav(
int wa_display_objectname, int wa_display_objectname,
wb_eUtility wa_utility, wb_eUtility wa_utility,
pwr_tStatus *status) : pwr_tStatus *status) :
parent_ctx(wa_parent_ctx), parent_ctx(wa_parent_ctx), type(wa_type),
ldhses(wa_ldhses), aref(wa_aref), editmode(wa_editmode), ldhses(wa_ldhses), aref(wa_aref), editmode(wa_editmode),
advanced_user(wa_advanced_user), advanced_user(wa_advanced_user),
display_objectname(wa_display_objectname), bypass(0), display_objectname(wa_display_objectname), bypass(0),
...@@ -685,6 +687,48 @@ int WAttNav::brow_cb( FlowCtx *ctx, flow_tEvent event) ...@@ -685,6 +687,48 @@ int WAttNav::brow_cb( FlowCtx *ctx, flow_tEvent event)
return 1; return 1;
} }
int WAttNav::crossref()
{
int sts;
pwr_tAName name;
char *namep;
pwr_tClassId classid;
int size;
sts = ldh_AttrRefToName ( ldhses, &aref, cdh_mNName, &namep, &size);
if ( EVEN(sts)) return sts;
strcpy( name, namep);
sts = ldh_GetAttrRefTid( ldhses, &aref, &classid);
if ( EVEN(sts)) return sts;
switch ( classid)
{
case pwr_cClass_Di:
case pwr_cClass_Dv:
case pwr_cClass_Do:
case pwr_cClass_Po:
case pwr_cClass_Av:
case pwr_cClass_Ai:
case pwr_cClass_Ao:
case pwr_cClass_Iv:
case pwr_cClass_Ii:
case pwr_cClass_Io:
case pwr_cClass_Co:
sts = WNav::crr_signal( brow, ldhses, NULL, name, NULL);
break;
default:
/* Not a signal */
sts = WNav::crr_object( brow, ldhses, NULL, name, NULL);
;
}
// if ( EVEN(sts))
// xnav->message(' ', XNav::get_message(sts));
return WATT__SUCCESS;
}
int WAttNav::object_attr() int WAttNav::object_attr()
{ {
int i, j; int i, j;
...@@ -976,7 +1020,16 @@ int WAttNav::init_brow_cb( FlowCtx *fctx, void *client_data) ...@@ -976,7 +1020,16 @@ int WAttNav::init_brow_cb( FlowCtx *fctx, void *client_data)
wattnav->enable_events(); wattnav->enable_events();
// Create the root item // Create the root item
wattnav->object_attr(); switch ( wattnav->type) {
case wattnav_eType_Object:
wattnav->object_attr();
break;
case wattnav_eType_CrossRef:
wattnav->crossref();
break;
default:
;
}
return 1; return 1;
} }
......
...@@ -43,10 +43,17 @@ ...@@ -43,10 +43,17 @@
#define wattnav_cVersion "X3.3b" #define wattnav_cVersion "X3.3b"
#define WATTNAV_BROW_MAX 25 #define WATTNAV_BROW_MAX 25
typedef enum {
wattnav_eType_Object,
wattnav_eType_CrossRef
} wattnav_eType;
class WAttNav { class WAttNav {
public: public:
WAttNav( WAttNav(
void *wa_parent_ctx, void *wa_parent_ctx,
wattnav_eType wa_type,
const char *wa_name, const char *wa_name,
ldh_tSesContext wa_ldhses, ldh_tSesContext wa_ldhses,
pwr_sAttrRef wa_aref, pwr_sAttrRef wa_aref,
...@@ -58,6 +65,7 @@ class WAttNav { ...@@ -58,6 +65,7 @@ class WAttNav {
virtual ~WAttNav(); virtual ~WAttNav();
void *parent_ctx; void *parent_ctx;
wattnav_eType type;
char name[80]; char name[80];
WNavBrow *brow; WNavBrow *brow;
ldh_tSesContext ldhses; ldh_tSesContext ldhses;
...@@ -83,6 +91,7 @@ class WAttNav { ...@@ -83,6 +91,7 @@ class WAttNav {
void message( char sev, const char *text); void message( char sev, const char *text);
void force_trace_scan(); void force_trace_scan();
int object_attr(); int object_attr();
int crossref();
int object_exist( brow_tObject object); int object_exist( brow_tObject object);
void redraw(); void redraw();
void enable_events(); void enable_events();
......
...@@ -2143,7 +2143,7 @@ int WNav::setup() ...@@ -2143,7 +2143,7 @@ int WNav::setup()
{ {
brow_pop( wnav_eBrowType_Setup); brow_pop( wnav_eBrowType_Setup);
brow_SetNodraw( brow->ctx); brow_SetNodraw( brow->ctx);
new WItemHeader( this, "Title", "Setup", NULL, flow_eDest_IntoLast); new WItemHeader( brow, "Title", "Setup", NULL, flow_eDest_IntoLast);
new WItemLocal( this, "DefaultDirectory", "setup_defaultdirectory", new WItemLocal( this, "DefaultDirectory", "setup_defaultdirectory",
pwr_eType_String, sizeof( gbl.default_directory), 0, 0, pwr_eType_String, sizeof( gbl.default_directory), 0, 0,
......
...@@ -145,6 +145,7 @@ class Ge; ...@@ -145,6 +145,7 @@ class Ge;
class WGe; class WGe;
class wb_utl; class wb_utl;
class CoLogin; class CoLogin;
class WCrr;
class ApplListElem { class ApplListElem {
public: public:
...@@ -321,6 +322,7 @@ class WNav : public WUtility{ ...@@ -321,6 +322,7 @@ class WNav : public WUtility{
virtual CoLogin *login_new( const char *name, const char *groupname, virtual CoLogin *login_new( const char *name, const char *groupname,
void (* bc_success)( void *), void (* bc_cancel)( void *), void (* bc_success)( void *), void (* bc_cancel)( void *),
pwr_tStatus *status) { return 0;} pwr_tStatus *status) { return 0;}
virtual WCrr *wcrr_new( pwr_tAttrRef *aref, pwr_tStatus *status) { return 0;}
static int brow_cb( FlowCtx *ctx, flow_tEvent event); static int brow_cb( FlowCtx *ctx, flow_tEvent event);
static int init_brow_base_cb( FlowCtx *fctx, void *client_data); static int init_brow_base_cb( FlowCtx *fctx, void *client_data);
...@@ -418,10 +420,12 @@ class WNav : public WUtility{ ...@@ -418,10 +420,12 @@ class WNav : public WUtility{
static int check_new_volumename( char *vname); static int check_new_volumename( char *vname);
// Crr module member functions // Crr module member functions
int crr_signal( char *filename, char *signalname, brow_tNode parent_node); static int crr_signal( WNavBrow *brow, ldh_tSesContext ldhses, char *filename, char *signalname,
int crr_object( char *filename, char *objectname, brow_tNode parent_node); brow_tNode parent_node);
int crr_code( char *filename, char *str, int brief, int func, static int crr_object( WNavBrow *brow, ldh_tSesContext ldhses, char *filename, char *objectname,
int case_sensitive); brow_tNode parent_node);
static int crr_code( WNavBrow *brow, ldh_tSesContext ldhses, char *filename, char *str, int brief,
int func, int case_sensitive);
int display_objects( pwr_tCid *cidp, char *name, pwr_tObjid root, int display_objects( pwr_tCid *cidp, char *name, pwr_tObjid root,
int depth); int depth);
void set_nodraw() { nodraw = 1;} void set_nodraw() { nodraw = 1;}
......
...@@ -73,6 +73,7 @@ ...@@ -73,6 +73,7 @@
#include "wb_build.h" #include "wb_build.h"
#include "wb_wtt.h" #include "wb_wtt.h"
#include "wb_log.h" #include "wb_log.h"
#include "wb_xcrr.h"
#include "ge.h" #include "ge.h"
#include "wb_utl.h" #include "wb_utl.h"
...@@ -404,7 +405,7 @@ dcli_tCmdTable wnav_command_table[] = { ...@@ -404,7 +405,7 @@ dcli_tCmdTable wnav_command_table[] = {
"CROSSREFERENCE", "CROSSREFERENCE",
&wnav_crossref_func, &wnav_crossref_func,
{ "dcli_arg1", "/NAME", "/FILE", "/STRING", "/BRIEF", { "dcli_arg1", "/NAME", "/FILE", "/STRING", "/BRIEF",
"/FUNCTION", "/CASE_SENSITIVE", ""} "/FUNCTION", "/CASE_SENSITIVE", "/WINDOW", ""}
}, },
{ {
"DISTRIBUTE", "DISTRIBUTE",
...@@ -4602,6 +4603,10 @@ static int wnav_crossref_func( void *client_data, ...@@ -4602,6 +4603,10 @@ static int wnav_crossref_func( void *client_data,
char func_str[80]; char func_str[80];
char *file_ptr; char *file_ptr;
pwr_tOName name_str; pwr_tOName name_str;
int window;
window = ODD( dcli_get_qualifier( "/WINDOW", 0, 0));
if ( ODD( dcli_get_qualifier( "/FILE", file_str, sizeof(file_str)))) if ( ODD( dcli_get_qualifier( "/FILE", file_str, sizeof(file_str))))
file_ptr = file_str; file_ptr = file_str;
...@@ -4620,7 +4625,7 @@ static int wnav_crossref_func( void *client_data, ...@@ -4620,7 +4625,7 @@ static int wnav_crossref_func( void *client_data,
} }
brief = ODD( dcli_get_qualifier( "/BRIEF", 0, 0)); brief = ODD( dcli_get_qualifier( "/BRIEF", 0, 0));
case_sens = ODD( dcli_get_qualifier( "/CASE_SENSITIVE", 0, 0)); case_sens = ODD( dcli_get_qualifier( "/CASE_SENSITIVE", 0, 0));
sts = wnav->crr_code( file_ptr, string_str, brief, 0, case_sens); sts = wnav->crr_code( wnav->brow, wnav->ldhses, file_ptr, string_str, brief, 0, case_sens);
if ( EVEN(sts)) if ( EVEN(sts))
wnav->message(' ', wnav_get_message(sts)); wnav->message(' ', wnav_get_message(sts));
} }
...@@ -4632,7 +4637,7 @@ static int wnav_crossref_func( void *client_data, ...@@ -4632,7 +4637,7 @@ static int wnav_crossref_func( void *client_data,
brief = ODD( dcli_get_qualifier( "/BRIEF", 0, 0)); brief = ODD( dcli_get_qualifier( "/BRIEF", 0, 0));
case_sens = ODD( dcli_get_qualifier( "/CASE_SENSITIVE", 0, 0)); case_sens = ODD( dcli_get_qualifier( "/CASE_SENSITIVE", 0, 0));
sts = wnav->crr_code( file_ptr, func_str, brief, 1, case_sens); sts = wnav->crr_code( wnav->brow, wnav->ldhses, file_ptr, func_str, brief, 1, case_sens);
if ( EVEN(sts)) if ( EVEN(sts))
wnav->message(' ', wnav_get_message(sts)); wnav->message(' ', wnav_get_message(sts));
} }
...@@ -4652,12 +4657,16 @@ static int wnav_crossref_func( void *client_data, ...@@ -4652,12 +4657,16 @@ static int wnav_crossref_func( void *client_data,
&namep, &size); &namep, &size);
if ( EVEN(sts)) return sts; if ( EVEN(sts)) return sts;
printf( "Crossreferences for %s\n\n", namep); if ( window) {
wnav->wcrr_new( &objar, &sts);
}
else {
printf( "Crossreferences for %s\n\n", namep);
sts = ldh_GetAttrRefTid( wnav->ldhses, &objar, &classid); sts = ldh_GetAttrRefTid( wnav->ldhses, &objar, &classid);
if ( EVEN(sts)) return sts; if ( EVEN(sts)) return sts;
switch ( classid) { switch ( classid) {
case pwr_cClass_Di: case pwr_cClass_Di:
case pwr_cClass_Dv: case pwr_cClass_Dv:
case pwr_cClass_Do: case pwr_cClass_Do:
...@@ -4672,9 +4681,11 @@ static int wnav_crossref_func( void *client_data, ...@@ -4672,9 +4681,11 @@ static int wnav_crossref_func( void *client_data,
case pwr_cClass_Sv: case pwr_cClass_Sv:
case pwr_cClass_ATv: case pwr_cClass_ATv:
case pwr_cClass_DTv: case pwr_cClass_DTv:
sts = wnav->crr_signal( wnav->brow, wnav->ldhses, NULL, name_str, NULL);
break; break;
default: default:
sts = wnav->crr_object( NULL, name_str, NULL); sts = wnav->crr_object( wnav->brow, wnav->ldhses, NULL, name_str, NULL);
}
} }
if ( EVEN(sts)) if ( EVEN(sts))
wnav->message(' ', wnav_get_message(sts)); wnav->message(' ', wnav_get_message(sts));
...@@ -4692,8 +4703,28 @@ static int wnav_crossref_func( void *client_data, ...@@ -4692,8 +4703,28 @@ static int wnav_crossref_func( void *client_data,
} }
brow_GetUserData( *node_list, (void **)&item); brow_GetUserData( *node_list, (void **)&item);
switch( item->type) if ( window) {
{ pwr_sAttrRef *sel_list;
int *sel_is_attr;
int sel_cnt;
sts = wnav->get_select( &sel_list, &sel_is_attr, &sel_cnt);
if ( EVEN(sts)) {
wnav->message('E', "Syntax error");
return WNAV__SYNTAX;
}
else if ( sel_cnt != 1) {
wnav->message('E', "Select one attribute");
return WNAV__SYNTAX;
}
wnav->wcrr_new( &sel_list[0], &sts);
if ( EVEN(sts))
wnav->message(' ', wnav_get_message(sts));
}
else {
switch( item->type) {
case wnav_eItemType_Object: case wnav_eItemType_Object:
sts = ((WItemBaseObject *)item)->open_crossref( wnav, 0, 0); sts = ((WItemBaseObject *)item)->open_crossref( wnav, 0, 0);
break; break;
...@@ -4702,6 +4733,7 @@ static int wnav_crossref_func( void *client_data, ...@@ -4702,6 +4733,7 @@ static int wnav_crossref_func( void *client_data,
break; break;
default: default:
; ;
}
} }
} }
return sts; return sts;
...@@ -6074,7 +6106,7 @@ int WNav::show_symbols() ...@@ -6074,7 +6106,7 @@ int WNav::show_symbols()
{ {
brow_pop( wnav_eBrowType_Other); brow_pop( wnav_eBrowType_Other);
brow_SetNodraw( brow->ctx); brow_SetNodraw( brow->ctx);
new WItemHeader( this, "Title", "Symbols", NULL, flow_eDest_IntoLast); new WItemHeader( brow, "Title", "Symbols", NULL, flow_eDest_IntoLast);
} }
new WItemCommand( this, text, NULL, new WItemCommand( this, text, NULL,
flow_eDest_IntoLast, key, 0, brow->pixmap_symbol); flow_eDest_IntoLast, key, 0, brow->pixmap_symbol);
...@@ -6357,7 +6389,7 @@ int WNav::show_file( ...@@ -6357,7 +6389,7 @@ int WNav::show_file(
{ {
brow_pop( wnav_eBrowType_Other); brow_pop( wnav_eBrowType_Other);
brow_SetNodraw( brow->ctx); brow_SetNodraw( brow->ctx);
new WItemHeader( this, "Title", title, NULL, flow_eDest_IntoLast); new WItemHeader( brow, "Title", title, NULL, flow_eDest_IntoLast);
new WItemFile( this, "", text, found_file, file_type, NULL, flow_eDest_IntoLast); new WItemFile( this, "", text, found_file, file_type, NULL, flow_eDest_IntoLast);
} }
else else
......
...@@ -53,27 +53,34 @@ ...@@ -53,27 +53,34 @@
#define abs(Dragon) ((Dragon) >= 0 ? (Dragon) : (-(Dragon))) #define abs(Dragon) ((Dragon) >= 0 ? (Dragon) : (-(Dragon)))
#endif #endif
class CrrCtx {
public:
CrrCtx( WNavBrow *a_brow, ldh_tSesContext a_ldhses) : brow(a_brow), ldhses(a_ldhses) {}
WNavBrow *brow;
ldh_tSesContext ldhses;
};
static void wnav_crr_insert_cb( void *ctx, void *parent_node, static void wnav_crr_insert_cb( void *ctx, void *parent_node,
navc_eItemType item_type, navc_eItemType item_type,
char *text1, char *text2, int write) char *text1, char *text2, int write)
{ {
if ( parent_node) { if ( 1) {
WNav *wnav = (WNav *)ctx; CrrCtx *cctx = (CrrCtx *)ctx;
switch( item_type) { switch( item_type) {
case navc_eItemType_Crossref: case navc_eItemType_Crossref:
new WItemCrossref( wnav, text1, text2, new WItemCrossref( cctx->brow, cctx->ldhses, text1, text2,
write, parent_node, flow_eDest_IntoLast); write, parent_node, flow_eDest_IntoLast);
break; break;
case navc_eItemType_Header: case navc_eItemType_Header:
new WItemHeader( wnav, "crr", text1, parent_node, flow_eDest_IntoLast); new WItemHeader( cctx->brow, "crr", text1, parent_node, flow_eDest_IntoLast);
break; break;
case navc_eItemType_Text: case navc_eItemType_Text:
new WItemText( wnav, "crr", text1, parent_node, flow_eDest_IntoLast); new WItemText( cctx->brow, "crr", text1, parent_node, flow_eDest_IntoLast);
break; break;
} }
} }
else { else { // TODO from pwrc ???
// Print out crossref info // Print out crossref info
switch( item_type) { switch( item_type) {
case navc_eItemType_Crossref: case navc_eItemType_Crossref:
...@@ -98,30 +105,32 @@ static void wnav_crr_insert_cb( void *ctx, void *parent_node, ...@@ -98,30 +105,32 @@ static void wnav_crr_insert_cb( void *ctx, void *parent_node,
int wnav_crr_name_to_objid_cb( void *ctx, char *name, pwr_tObjid *objid) int wnav_crr_name_to_objid_cb( void *ctx, char *name, pwr_tObjid *objid)
{ {
WNav *wnav = (WNav *)ctx; CrrCtx *cctx = (CrrCtx *)ctx;
return ldh_NameToObjid( wnav->ldhses, objid, name); return ldh_NameToObjid( cctx->ldhses, objid, name);
} }
int wnav_crr_get_volume_cb( void *ctx, pwr_tVolumeId *volid) int wnav_crr_get_volume_cb( void *ctx, pwr_tVolumeId *volid)
{ {
int sts; int sts;
ldh_sVolumeInfo info; ldh_sVolumeInfo info;
WNav *wnav = (WNav *)ctx; CrrCtx *cctx = (CrrCtx *)ctx;
ldh_tVolContext volctx = ldh_SessionToVol( wnav->ldhses); ldh_tVolContext volctx = ldh_SessionToVol( cctx->ldhses);
sts = ldh_GetVolumeInfo( volctx, &info); sts = ldh_GetVolumeInfo( volctx, &info);
*volid = info.Volume; *volid = info.Volume;
return WNAV__SUCCESS; return WNAV__SUCCESS;
} }
int WNav::crr_signal( int WNav::crr_signal( WNavBrow *brow,
char *filename, ldh_tSesContext ldhses,
char *signalname, char *filename,
brow_tNode parent_node) char *signalname,
brow_tNode parent_node)
{ {
int sts; int sts;
NavCrr *navcrr = new NavCrr( this, parent_node); CrrCtx *ctx = new CrrCtx( brow, ldhses);
NavCrr *navcrr = new NavCrr( ctx, parent_node);
navcrr->insert_cb = wnav_crr_insert_cb; navcrr->insert_cb = wnav_crr_insert_cb;
navcrr->name_to_objid_cb = wnav_crr_name_to_objid_cb; navcrr->name_to_objid_cb = wnav_crr_name_to_objid_cb;
navcrr->get_volume_cb = wnav_crr_get_volume_cb; navcrr->get_volume_cb = wnav_crr_get_volume_cb;
...@@ -129,16 +138,19 @@ int WNav::crr_signal( ...@@ -129,16 +138,19 @@ int WNav::crr_signal(
sts = navcrr->crr_signal( filename, signalname); sts = navcrr->crr_signal( filename, signalname);
delete navcrr; delete navcrr;
delete ctx;
return sts; return sts;
} }
int WNav::crr_object( int WNav::crr_object( WNavBrow *brow,
char *filename, ldh_tSesContext ldhses,
char *objectname, char *filename,
brow_tNode parent_node) char *objectname,
brow_tNode parent_node)
{ {
int sts; int sts;
NavCrr *navcrr = new NavCrr( this, parent_node); CrrCtx *ctx = new CrrCtx( brow, ldhses);
NavCrr *navcrr = new NavCrr( ctx, parent_node);
navcrr->insert_cb = wnav_crr_insert_cb; navcrr->insert_cb = wnav_crr_insert_cb;
navcrr->name_to_objid_cb = wnav_crr_name_to_objid_cb; navcrr->name_to_objid_cb = wnav_crr_name_to_objid_cb;
navcrr->get_volume_cb = wnav_crr_get_volume_cb; navcrr->get_volume_cb = wnav_crr_get_volume_cb;
...@@ -146,10 +158,12 @@ int WNav::crr_object( ...@@ -146,10 +158,12 @@ int WNav::crr_object(
sts = navcrr->crr_object( filename, objectname); sts = navcrr->crr_object( filename, objectname);
delete navcrr; delete navcrr;
delete ctx;
return sts; return sts;
} }
int WNav::crr_code( int WNav::crr_code( WNavBrow *brow,
ldh_tSesContext ldhses,
char *filename, char *filename,
char *str, char *str,
int brief, int brief,
...@@ -157,7 +171,8 @@ int WNav::crr_code( ...@@ -157,7 +171,8 @@ int WNav::crr_code(
int case_sensitive) int case_sensitive)
{ {
int sts; int sts;
NavCrr *navcrr = new NavCrr( this, NULL); CrrCtx *ctx = new CrrCtx( brow, ldhses);
NavCrr *navcrr = new NavCrr( ctx, NULL);
navcrr->insert_cb = wnav_crr_insert_cb; navcrr->insert_cb = wnav_crr_insert_cb;
navcrr->name_to_objid_cb = wnav_crr_name_to_objid_cb; navcrr->name_to_objid_cb = wnav_crr_name_to_objid_cb;
navcrr->get_volume_cb = wnav_crr_get_volume_cb; navcrr->get_volume_cb = wnav_crr_get_volume_cb;
...@@ -165,6 +180,7 @@ int WNav::crr_code( ...@@ -165,6 +180,7 @@ int WNav::crr_code(
sts = navcrr->crr_code( filename, str, brief, func, case_sensitive); sts = navcrr->crr_code( filename, str, brief, func, case_sensitive);
delete navcrr; delete navcrr;
delete ctx;
return sts; return sts;
} }
......
...@@ -617,10 +617,10 @@ int WItemBaseObject::open_crossref( WNav *wnav, double x, double y) ...@@ -617,10 +617,10 @@ int WItemBaseObject::open_crossref( WNav *wnav, double x, double y)
case pwr_cClass_Iv: case pwr_cClass_Iv:
case pwr_cClass_Ii: case pwr_cClass_Ii:
case pwr_cClass_Io: case pwr_cClass_Io:
sts = wnav->crr_signal( NULL, name, node); sts = wnav->crr_signal( wnav->brow, wnav->ldhses, NULL, name, node);
break; break;
default: default:
sts = wnav->crr_object( NULL, name, node); sts = wnav->crr_object( wnav->brow, wnav->ldhses, NULL, name, node);
} }
if ( sts == NAV__OBJECTNOTFOUND) if ( sts == NAV__OBJECTNOTFOUND)
wnav->message('E', "Object not found in crossreferens file"); wnav->message('E', "Object not found in crossreferens file");
...@@ -809,35 +809,35 @@ WItemLocal::WItemLocal( WNav *wnav, const char *item_name, const char *attr, ...@@ -809,35 +809,35 @@ WItemLocal::WItemLocal( WNav *wnav, const char *item_name, const char *attr,
brow_SetTraceAttr( node, attr, "", flow_eTraceType_User); brow_SetTraceAttr( node, attr, "", flow_eTraceType_User);
} }
WItemText::WItemText( WNav *wnav, const char *item_name, char *text, WItemText::WItemText( WNavBrow *brow, const char *item_name, char *text,
brow_tNode dest, flow_eDest dest_code) : brow_tNode dest, flow_eDest dest_code) :
WItem( pwr_cNObjid, 0) WItem( pwr_cNObjid, 0)
{ {
type = wnav_eItemType_Text; type = wnav_eItemType_Text;
strcpy( name, item_name); strcpy( name, item_name);
brow_CreateNode( wnav->brow->ctx, "text", wnav->brow->nc_object, brow_CreateNode( brow->ctx, "text", brow->nc_object,
dest, dest_code, (void *)this, 1, &node); dest, dest_code, (void *)this, 1, &node);
brow_SetAnnotation( node, 0, text, strlen(text)); brow_SetAnnotation( node, 0, text, strlen(text));
} }
WItemHeader::WItemHeader( WNav *wnav, const char *item_name, const char *title, WItemHeader::WItemHeader( WNavBrow *brow, const char *item_name, const char *title,
brow_tNode dest, flow_eDest dest_code) : brow_tNode dest, flow_eDest dest_code) :
WItem( pwr_cNObjid, 0) WItem( pwr_cNObjid, 0)
{ {
type = wnav_eItemType_Header; type = wnav_eItemType_Header;
strcpy( name, item_name); strcpy( name, item_name);
brow_CreateNode( wnav->brow->ctx, "header", wnav->brow->nc_header, brow_CreateNode( brow->ctx, "header", brow->nc_header,
dest, dest_code, (void *)this, 1, &node); dest, dest_code, (void *)this, 1, &node);
brow_SetAnnotation( node, 0, title, strlen(title)); brow_SetAnnotation( node, 0, title, strlen(title));
} }
WItemHeaderLarge::WItemHeaderLarge( WNav *wnav, const char *item_name, char *title, WItemHeaderLarge::WItemHeaderLarge( WNavBrow *brow, const char *item_name, char *title,
brow_tNode dest, flow_eDest dest_code) : brow_tNode dest, flow_eDest dest_code) :
WItem( pwr_cNObjid, 0) WItem( pwr_cNObjid, 0)
{ {
type = wnav_eItemType_HeaderLarge; type = wnav_eItemType_HeaderLarge;
strcpy( name, item_name); strcpy( name, item_name);
brow_CreateNode( wnav->brow->ctx, "header", wnav->brow->nc_headerlarge, brow_CreateNode( brow->ctx, "header", brow->nc_headerlarge,
dest, dest_code, (void *)this, 1, &node); dest, dest_code, (void *)this, 1, &node);
brow_SetAnnotation( node, 0, title, strlen(title)); brow_SetAnnotation( node, 0, title, strlen(title));
} }
...@@ -2581,10 +2581,10 @@ int WItemAttrObject::open_crossref( WNav *wnav, double x, double y) ...@@ -2581,10 +2581,10 @@ int WItemAttrObject::open_crossref( WNav *wnav, double x, double y)
case pwr_cClass_Iv: case pwr_cClass_Iv:
case pwr_cClass_Ii: case pwr_cClass_Ii:
case pwr_cClass_Io: case pwr_cClass_Io:
sts = wnav->crr_signal( NULL, aname, node); sts = wnav->crr_signal( wnav->brow, wnav->ldhses, NULL, aname, node);
break; break;
default: default:
sts = wnav->crr_object( NULL, aname, node); sts = wnav->crr_object( wnav->brow, wnav->ldhses, NULL, aname, node);
} }
if ( sts == NAV__OBJECTNOTFOUND) if ( sts == NAV__OBJECTNOTFOUND)
wnav->message('E', "Object not found in crossreferens file"); wnav->message('E', "Object not found in crossreferens file");
...@@ -3120,10 +3120,11 @@ int WItemMask::set( int set_value) ...@@ -3120,10 +3120,11 @@ int WItemMask::set( int set_value)
return WNAV__SUCCESS; return WNAV__SUCCESS;
} }
WItemCrossref::WItemCrossref( WNav *wnav, char *item_ref_name, WItemCrossref::WItemCrossref( WNavBrow *item_brow, ldh_tSesContext item_ldhses,
char *item_ref_class, int item_write, brow_tNode dest, char *item_ref_name,
flow_eDest dest_code) : char *item_ref_class, int item_write, brow_tNode dest,
WItem( pwr_cNObjid, 0), write(item_write) flow_eDest dest_code) :
WItem( pwr_cNObjid, 0), brow(item_brow), ldhses(item_ldhses), write(item_write)
{ {
int sts; int sts;
char window_name[120]; char window_name[120];
...@@ -3142,21 +3143,21 @@ WItemCrossref::WItemCrossref( WNav *wnav, char *item_ref_name, ...@@ -3142,21 +3143,21 @@ WItemCrossref::WItemCrossref( WNav *wnav, char *item_ref_name,
strcpy( ref_name, s + 1); strcpy( ref_name, s + 1);
*s = 0; *s = 0;
sts = ldh_NameToObjid( wnav->ldhses, &objid, window_name); sts = ldh_NameToObjid( ldhses, &objid, window_name);
if ( EVEN(sts)) return; if ( EVEN(sts)) return;
brow_CreateNode( wnav->brow->ctx, "crr", wnav->brow->nc_object, brow_CreateNode( brow->ctx, "crr", brow->nc_object,
dest, dest_code, (void *) this, 1, &node); dest, dest_code, (void *) this, 1, &node);
if ( write == 1) if ( write == 1)
brow_SetAnnotPixmap( node, 0, wnav->brow->pixmap_crrwrite); brow_SetAnnotPixmap( node, 0, brow->pixmap_crrwrite);
else if ( write == 2) else if ( write == 2)
{ {
brow_SetAnnotPixmap( node, 0, wnav->brow->pixmap_crrwrite); brow_SetAnnotPixmap( node, 0, brow->pixmap_crrwrite);
brow_SetAnnotPixmap( node, 1, wnav->brow->pixmap_crrread); brow_SetAnnotPixmap( node, 1, brow->pixmap_crrread);
} }
else else
brow_SetAnnotPixmap( node, 0, wnav->brow->pixmap_crrread); brow_SetAnnotPixmap( node, 0, brow->pixmap_crrread);
brow_SetAnnotation( node, 0, name, strlen(name)); brow_SetAnnotation( node, 0, name, strlen(name));
......
...@@ -152,19 +152,19 @@ class WItemLocal : public WItem { ...@@ -152,19 +152,19 @@ class WItemLocal : public WItem {
class WItemText : public WItem { class WItemText : public WItem {
public: public:
WItemText( WNav *wnav, const char *item_name, char *text, WItemText( WNavBrow *brow, const char *item_name, char *text,
brow_tNode dest, flow_eDest dest_code); brow_tNode dest, flow_eDest dest_code);
}; };
class WItemHeader : public WItem { class WItemHeader : public WItem {
public: public:
WItemHeader( WNav *wnav, const char *item_name, const char *title, WItemHeader( WNavBrow *brow, const char *item_name, const char *title,
brow_tNode dest, flow_eDest dest_code); brow_tNode dest, flow_eDest dest_code);
}; };
class WItemHeaderLarge : public WItem { class WItemHeaderLarge : public WItem {
public: public:
WItemHeaderLarge( WNav *wnav, const char *item_name, char *title, WItemHeaderLarge( WNavBrow *brow, const char *item_name, char *title,
brow_tNode dest, flow_eDest dest_code); brow_tNode dest, flow_eDest dest_code);
}; };
...@@ -228,8 +228,12 @@ class WItemFile : public WItem { ...@@ -228,8 +228,12 @@ class WItemFile : public WItem {
class WItemCrossref : public WItem { class WItemCrossref : public WItem {
public: public:
WItemCrossref( WNav *wnav, char *item_ref_name, char *item_ref_class, WItemCrossref(
WNavBrow *item_brow, ldh_tSesContext item_ldhses,
char *item_ref_name, char *item_ref_class,
int item_write, brow_tNode dest, flow_eDest dest_code); int item_write, brow_tNode dest, flow_eDest dest_code);
WNavBrow *brow;
ldh_tSesContext ldhses;
char ref_name[32]; char ref_name[32];
char ref_class[32]; char ref_class[32];
int write; int write;
......
/*
* Proview $Id$
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with the program, if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* wb_xcrr.cpp -- Display object crossreferences */
#if defined OS_VMS && defined __ALPHA
# pragma message disable (NOSIMPINT,EXTROUENCUNNOBJ)
#endif
#if defined OS_VMS && !defined __ALPHA
# pragma message disable (LONGEXTERN)
#endif
#include "glow_std.h"
#include <stdio.h>
#include <stdlib.h>
#include "co_cdh.h"
#include "co_dcli.h"
#include "co_time.h"
#include "flow.h"
#include "flow_browctx.h"
#include "flow_browapi.h"
#include "wb_xcrr.h"
#include "wb_watt_msg.h"
#include "co_lng.h"
WCrr::~WCrr()
{
}
WCrr::WCrr(
void *xa_parent_ctx,
pwr_sAttrRef *xa_objar,
int xa_advanced_user,
int *xa_sts) :
parent_ctx(xa_parent_ctx),
objar(*xa_objar),
input_open(0), input_multiline(0),
close_cb(0), redraw_cb(0), popup_menu_cb(0), start_trace_cb(0),
client_data(0)
{
*xa_sts = WATT__SUCCESS;
}
void WCrr::xcrr_popup_menu_cb( void *ctx, pwr_sAttrRef attrref,
unsigned long item_type, unsigned long utility,
char *arg, int x, int y)
{
if ( ((WCrr *)ctx)->popup_menu_cb)
(((WCrr *)ctx)->popup_menu_cb) ( ((WCrr *)ctx)->parent_ctx, attrref,
item_type, utility, arg, x, y);
}
void WCrr::xcrr_start_trace_cb( void *ctx, pwr_tObjid objid, char *name)
{
if ( ((WCrr *)ctx)->start_trace_cb)
((WCrr *)ctx)->start_trace_cb( ((WCrr *)ctx)->parent_ctx, objid, name);
}
void WCrr::xcrr_close_cb( void *ctx)
{
if ( ((WCrr *)ctx)->close_cb)
((WCrr *)ctx)->close_cb( ((WCrr *)ctx)->parent_ctx, ctx);
}
/*
* Proview $Id$
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with the program, if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef wb_xcrr_h
#define wb_xcrr_h
class WAttNav;
/* wb_xcrr.h -- Object crossreferences */
#ifndef pwr_h
# include "pwr.h"
#endif
class WCrr {
public:
WCrr(
void *xa_parent_ctx,
pwr_sAttrRef *xa_objar,
int xa_advanced_user,
int *xa_sts);
virtual ~WCrr();
void *parent_ctx;
pwr_sAttrRef objar;
char name[80];
WAttNav *xcrrnav;
void *root_item;
int input_open;
int input_multiline;
void *object;
void (*close_cb) ( void *, void *);
void (*redraw_cb) (void *);
void (*popup_menu_cb)( void *, pwr_sAttrRef, unsigned long,
unsigned long, char *, int x, int y);
void (*start_trace_cb)( void *, pwr_tObjid, char *);
void *client_data;
brow_tObject input_node;
char input_name[80];
virtual void pop() {}
static void xcrr_popup_menu_cb( void *ctx, pwr_sAttrRef attrref,
unsigned long item_type, unsigned long utility,
char *arg, int x, int y);
static void xcrr_start_trace_cb( void *ctx, pwr_tObjid objid, char *name);
static void xcrr_close_cb( void *ctx);
};
#endif
...@@ -3903,23 +3903,27 @@ int GeValue::scan( grow_tObject object) ...@@ -3903,23 +3903,27 @@ int GeValue::scan( grow_tObject object)
else else
first_scan = false; first_scan = false;
switch ( format[1]) { if ( cdh_ObjidIsNull( aref.Objid))
case '1':
// Format %1o, write path
sts = gdh_AttrrefToName ( &aref, name, sizeof(name),
cdh_mName_pathStrict);
break;
case '2':
// Format %2o, write volume and path
sts = gdh_AttrrefToName ( &aref, name, sizeof(name),
cdh_mName_volumeStrict);
break;
default:
sts = gdh_AttrrefToName ( &aref, name, sizeof(name),
cdh_mName_object | cdh_mName_attribute);
}
if ( EVEN(sts))
strcpy( name, ""); strcpy( name, "");
else {
switch ( format[1]) {
case '1':
// Format %1o, write path
sts = gdh_AttrrefToName ( &aref, name, sizeof(name),
cdh_mName_pathStrict);
break;
case '2':
// Format %2o, write volume and path
sts = gdh_AttrrefToName ( &aref, name, sizeof(name),
cdh_mName_volumeStrict);
break;
default:
sts = gdh_AttrrefToName ( &aref, name, sizeof(name),
cdh_mName_object | cdh_mName_attribute);
}
if ( EVEN(sts))
strcpy( name, "");
}
len = sprintf( buf, "%s", name); len = sprintf( buf, "%s", name);
memcpy( &old_value, &aref, MIN(size, (int) sizeof(old_value))); memcpy( &old_value, &aref, MIN(size, (int) sizeof(old_value)));
break; break;
......
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