Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
65909c5b
Commit
65909c5b
authored
Apr 26, 2007
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Int64 and UInt64 added
parent
8a53951c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
1 deletion
+27
-1
java/exe/jpwr_rt_gdh/src/jpwr_rt_gdh.c
java/exe/jpwr_rt_gdh/src/jpwr_rt_gdh.c
+27
-1
No files found.
java/exe/jpwr_rt_gdh/src/jpwr_rt_gdh.c
View file @
65909c5b
/*
* Proview $Id: jpwr_rt_gdh.c,v 1.1
3 2006-06-14 05:06:05
claes Exp $
* Proview $Id: jpwr_rt_gdh.c,v 1.1
4 2007-04-26 11:26:16
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -1490,9 +1490,11 @@ static void gdh_TranslateSuffixToClassData (
{
"INT8"
,
pwr_eType_Int8
,
sizeof
(
pwr_tInt8
)},
{
"INT16"
,
pwr_eType_Int16
,
sizeof
(
pwr_tInt16
)},
{
"INT32"
,
pwr_eType_Int32
,
sizeof
(
pwr_tInt32
)},
{
"INT64"
,
pwr_eType_Int64
,
sizeof
(
pwr_tInt64
)},
{
"UINT8"
,
pwr_eType_UInt8
,
sizeof
(
pwr_tUInt8
)},
{
"UINT16"
,
pwr_eType_UInt16
,
sizeof
(
pwr_tInt16
)},
{
"UINT32"
,
pwr_eType_UInt32
,
sizeof
(
pwr_tInt32
)},
{
"UINT64"
,
pwr_eType_UInt64
,
sizeof
(
pwr_tInt64
)},
{
"OBJID"
,
pwr_eType_Objid
,
sizeof
(
pwr_tObjid
)},
// {"STRING" ,pwr_eType_String, sizeof(void *)},
{
"TIME"
,
pwr_eType_Time
,
sizeof
(
pwr_tTime
)},
...
...
@@ -1625,6 +1627,10 @@ static int gdh_StringToAttr( char *str_value, char *buffer_p, int buffer_size,
if
(
sscanf
(
str_value
,
"%d"
,
(
pwr_tInt32
*
)
buffer_p
)
!=
1
)
return
GDH__BADARG
;
break
;
case
pwr_eType_Int64
:
if
(
sscanf
(
str_value
,
"%lld"
,
(
pwr_tInt64
*
)
buffer_p
)
!=
1
)
return
GDH__BADARG
;
break
;
case
pwr_eType_UInt8
:
{
pwr_tUInt8
vint8
;
...
...
@@ -1647,6 +1653,10 @@ static int gdh_StringToAttr( char *str_value, char *buffer_p, int buffer_size,
if
(
sscanf
(
str_value
,
"%u"
,
(
pwr_tUInt32
*
)
buffer_p
)
!=
1
)
return
GDH__BADARG
;
break
;
case
pwr_eType_UInt64
:
if
(
sscanf
(
str_value
,
"%llu"
,
(
pwr_tUInt64
*
)
buffer_p
)
!=
1
)
return
GDH__BADARG
;
break
;
case
pwr_eType_String
:
strncpy
(
buffer_p
,
str_value
,
buffer_size
);
break
;
...
...
@@ -1810,6 +1820,14 @@ static void gdh_AttrToString( int type_id, void *value_ptr,
*
len
=
sprintf
(
str
,
format
,
*
(
int
*
)
value_ptr
);
break
;
}
case
pwr_eType_Int64
:
{
if
(
!
format
)
*
len
=
sprintf
(
str
,
"%lld"
,
*
(
pwr_tInt64
*
)
value_ptr
);
else
*
len
=
sprintf
(
str
,
format
,
*
(
pwr_tInt64
*
)
value_ptr
);
break
;
}
case
pwr_eType_UInt8
:
{
if
(
!
format
)
...
...
@@ -1838,6 +1856,14 @@ static void gdh_AttrToString( int type_id, void *value_ptr,
*
len
=
sprintf
(
str
,
format
,
*
(
unsigned
int
*
)
value_ptr
);
break
;
}
case
pwr_eType_UInt64
:
{
if
(
!
format
)
*
len
=
sprintf
(
str
,
"%llu"
,
*
(
pwr_tUInt64
*
)
value_ptr
);
else
*
len
=
sprintf
(
str
,
format
,
*
(
pwr_tUInt64
*
)
value_ptr
);
break
;
}
case
pwr_eType_String
:
{
strncpy
(
str
,
(
char
*
)
value_ptr
,
size
);
...
...
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