Skip to content

Commit

Permalink
Merge commit 'upstream/1.2.25'
Browse files Browse the repository at this point in the history
* commit 'upstream/1.2.25':
  Imported Upstream version 1.2.25
  • Loading branch information
Michael Davidsaver committed Dec 6, 2009
2 parents a6c3c17 + cac0a69 commit f0a996c
Show file tree
Hide file tree
Showing 9 changed files with 56 additions and 20 deletions.
9 changes: 5 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# in the file LICENSE that is included with this distribution.
#*************************************************************************
#
# Makefile,v 1.16 2007/10/02 19:08:22 jba Exp
# Makefile,v 1.18 2008/12/03 17:20:17 jba Exp
#
TOP=.
include $(TOP)/configure/CONFIG
Expand All @@ -25,9 +25,11 @@ ifeq ($(OS_CLASS), Darwin)
GCC_OPT_YES = -O2
endif

# For purify, EPICS base must not use READLINE
#HOST_OPT=NO
#DEBUGCMD = purify -first-only -chain-length=40 -max_threads=256
#DEBUGCMD = purify -first-only -chain-length=40 -max_threads=256 \
-always-use-cache-dir -cache-dir=$(shell $(PERL) $(TOP)/config/fullPathName.pl .)
# -always-use-cache-dir -cache-dir=$(shell $(PERL) $(TOP)/config/fullPathName.pl .)
#DEBUGCMD = purify -first-only -chain-length=40 -max_threads=256 \
# -always-use-cache-dir -cache-dir=$(shell $(PERL) $(TOOLS)/fullPathName.pl .)

Expand Down Expand Up @@ -166,7 +168,7 @@ endif

PROD_LIBS += Com
PROD_LIBS_DEFAULT += Xmu Xm Xt X11
PROD_LIBS_Linux += Xmu Xm Xt X11 Xp
PROD_LIBS_Linux += Xmu Xm Xt X11
PROD_LIBS_Darwin += Xmu Xm Xt X11

PROD_LIBS_WIN32 += $(EXCEED_XLIBS)
Expand All @@ -180,7 +182,6 @@ Xmu_DIR = $(X11_LIB)
Xm_DIR = $(MOTIF_LIB)
Xt_DIR = $(X11_LIB)
X11_DIR = $(X11_LIB)
Xp_DIR = $(MOTIF_LIB)

RCS_WIN32 += alh.rc

Expand Down
16 changes: 7 additions & 9 deletions alCA.c
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,12 @@ static void alCaNewAlarmEvent(struct event_handler_args args)
int ackt, acks;
char value[MAX_STRING_SIZE];

if (args.status != ECA_NORMAL) {
errMsg("alCaNewAlarmEvent failed: Return status: %s "
" for PV %s\n",ca_message(args.status),ca_name(args.chid));
return;
}

stat = ((struct dbr_stsack_string *) args.dbr)->status;
sevr = ((struct dbr_stsack_string *) args.dbr)->severity;
acks = ((struct dbr_stsack_string *) args.dbr)->acks;
Expand All @@ -485,15 +491,7 @@ static void alCaNewAlarmEvent(struct event_handler_args args)

strcpy(value, ((struct dbr_stsack_string *) args.dbr)->value);

switch (args.status) {
case ECA_NORMAL:
alNewEvent(stat, sevr, acks, ackt, value, args.usr);
break;
default:
errMsg("alCaNewAlarmEvent failed: Return status: %s "
" for PV %s\n",ca_message(args.status),ca_name(args.chid));
break;
}
alNewEvent(stat, sevr, acks, ackt, value, args.usr);
}

/*********************************************************************
Expand Down
13 changes: 13 additions & 0 deletions alh.notes
Original file line number Diff line number Diff line change
Expand Up @@ -561,3 +561,16 @@ Mon Nov 26 10:11:55 CST 2007

Tue Feb 5 10:19:30 CST 2008 ALH_1_2_24
Portability changes for 64bit builds.

Wed Aug 13 14:34:23 CDT 2008
Added callback procedures to the file selection dialogs to be called when
the window manager protocol WM_DELETE_WINDOW is received.

Mon Aug 18 15:59:03 CDT 2008
Added usage of a BROWSER environmant variable which defines the browser
command (used to display the ALH User's Guide when Help is selected).
Removed Xp from need libraries for linux builds.

Thu Oct 15 09:44:40 CDT 2009 ALH_1_2_25
Removed usage of YES macro for build with base R3.14.11.
Added comment in alAudio.c to uncomment/modify for alarm sounds.
6 changes: 4 additions & 2 deletions browser.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ int callBrowser(char *url)
netscapew=findNetscapeWindow();
/* If no window found, exec Netscape */
if(!netscapew) {
envstring=getenv("NETSCAPEPATH");
envstring=getenv("BROWSER");
if(!envstring) envstring=getenv("NETSCAPEPATH");
if(!envstring) {
sprintf(command,"%s -install '%s' &",NETSCAPEPATH,url);
}
Expand All @@ -111,7 +112,8 @@ int callBrowser(char *url)
}
/* Netscape window is valid, send url via -remote */
/* (Use -id for speed) */
envstring=getenv("NETSCAPEPATH");
envstring=getenv("BROWSER");
if(!envstring) envstring=getenv("NETSCAPEPATH");
if(!envstring) {
sprintf(command,"%s -id 0x%x -remote 'openURL(%s)' &",
NETSCAPEPATH,(unsigned int)netscapew,url);
Expand Down
12 changes: 11 additions & 1 deletion dialog.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
#include <Xm/Xm.h>
#include <Xm/MessageB.h>
#include <Xm/FileSB.h>
#include <Xm/Protocols.h>
#include <Xm/AtomMgr.h>

#include "ax.h"

Expand Down Expand Up @@ -58,7 +60,8 @@ String title,String pattern,String directory)
static void *oldCancel=NULL;
static XtPointer oldOkParm = 0;
static XtPointer oldCancelParm = 0;
char file_sel[]="file_sel";
char file_sel[]="file_sel";
Atom WM_DELETE_WINDOW;

/* parent = 0 means we want to unmanage the fileSelectdialog */
if (!parent){
Expand All @@ -82,6 +85,8 @@ String title,String pattern,String directory)
XtVaSetValues(fileselectdialog,
XmNallowShellResize, FALSE,
NULL);
WM_DELETE_WINDOW = XmInternAtom(XtDisplay(fileselectdialog),
"WM_DELETE_WINDOW", False);
XtAddCallback(fileselectdialog,XmNhelpCallback,
(XtCallbackProc)helpCallback,(XtPointer)NULL);
} else {
Expand All @@ -90,6 +95,8 @@ String title,String pattern,String directory)
(XtCallbackProc)oldOk ,(XtPointer)oldOkParm);
if (oldCancel) XtRemoveCallback(fileselectdialog,XmNcancelCallback,
(XtCallbackProc)oldCancel ,(XtPointer)oldCancelParm);
if (oldCancel) XmRemoveWMProtocolCallback(XtParent(fileselectdialog),
WM_DELETE_WINDOW,(XtCallbackProc)oldCancel,(XtPointer)oldCancelParm );
}

Xtitle=XmStringCreateLtoR(title,XmSTRING_DEFAULT_CHARSET);
Expand All @@ -112,6 +119,9 @@ String title,String pattern,String directory)
(XtCallbackProc)okCallback, (XtPointer)okParm);
XtAddCallback(fileselectdialog,XmNcancelCallback,
(XtCallbackProc)cancelCallback,(XtPointer)cancelParm);
XmAddWMProtocolCallback(XtParent(fileselectdialog),WM_DELETE_WINDOW,
(XtCallbackProc)cancelCallback,(XtPointer)cancelParm );

oldOk = okCallback;
oldCancel = cancelCallback;
oldOkParm = okParm;
Expand Down
10 changes: 10 additions & 0 deletions file.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
#include <stdio.h>
#include <signal.h>
#include <errno.h>

#include <Xm/Protocols.h>
#include <Xm/AtomMgr.h>

#include "alh.h"

#ifdef HAVE_SYSV_IPC
Expand Down Expand Up @@ -285,6 +289,7 @@ void exit_quit(Widget w, XtPointer clientdata, XtPointer calldata)
free(area);
}
XtDestroyWidget(topLevelShell);
XtDestroyWidget(w);
XFreeFont(display,font_info);
#ifndef WIN32
if(_lock_flag) {
Expand Down Expand Up @@ -512,6 +517,11 @@ int programId,Widget widget)
(void *)exit_quit,(XtPointer)FALSE,
(XtPointer)NULL,
fileTypeString, (String)pattern, dir);
Atom WM_DELETE_WINDOW;
WM_DELETE_WINDOW = XmInternAtom(XtDisplay(fileSelectionBox),
"WM_DELETE_WINDOW", False);
XmAddWMProtocolCallback(XtParent(fileSelectionBox),WM_DELETE_WINDOW,
(XtCallbackProc)exit_quit,(XtPointer)FALSE );
}

/* Display file error dialog */
Expand Down
2 changes: 1 addition & 1 deletion force.c
Original file line number Diff line number Diff line change
Expand Up @@ -1025,7 +1025,7 @@ void forcePVUpdateFields(GCLINK* gclink,FORCEPV* pfPV,int context)

/* temporarily disable forcePV */
disabledHold=pforcePV->disabled;
pforcePV->disabled=YES;
pforcePV->disabled=1;

if (pforcePV->forceValue != pfPV->forceValue) pforcePV->forceValue=pfPV->forceValue;
if (pforcePV->resetValue != pfPV->resetValue) pforcePV->resetValue=pfPV->resetValue;
Expand Down
4 changes: 3 additions & 1 deletion os/default/alAudio.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@
\*************************************************************************/
/* alAudio.c
*
* alAudio.c,v 1.3 2003/02/27 17:20:08 jba Exp
* alAudio.c,v 1.4 2009/10/15 14:50:20 jba Exp
*
*/

#include <stdlib.h>
#include "alh.h"

/* Audio device not implemented */
Expand All @@ -27,6 +28,7 @@
******************************************************/
int alBeep(Display *displayBB)
{
/* system("play /path/to/beep.wav"); */
XBell(displayBB,0);
return 0;
}
Expand Down
4 changes: 2 additions & 2 deletions showmask.c
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ ALINK *area;
if (_passive_flag && i == ALARMACKT ) {
XtVaSetValues(alarmMaskToggleButtonW[i], XmNsensitive, FALSE, NULL);
}
long ilong=i;
XtPointer ilong=i;
XtAddCallback(alarmMaskToggleButtonW[i], XmNvalueChangedCallback,
(XtCallbackProc)forceMaskChangeCallback, (XtPointer)ilong);
}
Expand Down Expand Up @@ -458,7 +458,7 @@ ALINK *area;
******************************************************/
static void forceMaskChangeCallback(Widget widget,XtPointer calldata,XtPointer cbs)
{
int index=(long)calldata;
long index=(long)calldata;
char *mask;
Widget maskWidget;
XmString string;
Expand Down

0 comments on commit f0a996c

Please sign in to comment.