Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
sinqdev
sicspsi
Commits
07b41096
Commit
07b41096
authored
Aug 03, 2018
by
koennecke
Browse files
Removed the unnecessary access to hmcontrol in MakeFA
parent
a57f8684
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
22 deletions
+6
-22
faverage.c
faverage.c
+6
-22
No files found.
faverage.c
View file @
07b41096
...
...
@@ -14,7 +14,11 @@
Added focusraw command for retrieving single detector banks in support
of the colour mapping part of the FOCUS status display.
Mark Koennecke, July 2001
Mark Koennecke, July 2001
Removed unnecessary access to hmc
Mark Koennecke, August 2018
---------------------------------------------------------------------------*/
#include <stdlib.h>
#include <assert.h>
...
...
@@ -323,7 +327,6 @@ int MakeFA(SConnection * pCon, SicsInterp * pSics, void *pData,
int
argc
,
char
*
argv
[])
{
pFocusAverager
pNew
=
NULL
;
CommandList
*
pCom
=
NULL
;
pDummy
pDum
=
NULL
;
char
pBueffel
[
256
];
int
iRet
;
...
...
@@ -338,31 +341,12 @@ int MakeFA(SConnection * pCon, SicsInterp * pSics, void *pData,
/* we need two parameters: the name for the averager and the histogram
memory
*/
if
(
argc
<
3
)
{
if
(
argc
<
2
)
{
SCWrite
(
pCon
,
"ERROR: Insufficient number of parameters to MakeFA"
,
eError
);
return
0
;
}
/* find histogram memory */
pCom
=
FindCommand
(
pSics
,
argv
[
2
]);
if
(
!
pCom
)
{
snprintf
(
pBueffel
,
255
,
"ERROR: histogram memory %s NOT found!"
,
argv
[
2
]);
SCWrite
(
pCon
,
pBueffel
,
eError
);
return
0
;
}
pDum
=
(
pDummy
)
pCom
->
pData
;
if
(
!
pDum
)
{
snprintf
(
pBueffel
,
255
,
"ERROR: histogram memory %s INVALID!"
,
argv
[
2
]);
SCWrite
(
pCon
,
pBueffel
,
eError
);
return
0
;
}
if
(
strcmp
(
pDum
->
pDescriptor
->
name
,
"HMcontrol"
)
!=
0
)
{
snprintf
(
pBueffel
,
255
,
"ERROR: %s is NO histogram control object!"
,
argv
[
2
]);
SCWrite
(
pCon
,
pBueffel
,
eError
);
return
0
;
}
/* we got what we need: set things up */
pNew
=
(
pFocusAverager
)
malloc
(
sizeof
(
FocusAverager
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment