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
7f9bce0b
Commit
7f9bce0b
authored
Feb 06, 2003
by
ml
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed to old co_eBO and co_eFT
parent
4ce66654
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
66 additions
and
32 deletions
+66
-32
src/lib/co/src/co_platform.c
src/lib/co/src/co_platform.c
+29
-9
src/lib/co/src/co_platform.h
src/lib/co/src/co_platform.h
+37
-23
No files found.
src/lib/co/src/co_platform.c
View file @
7f9bce0b
...
...
@@ -11,8 +11,25 @@
/*
* co_GetOwnPlatform
*/
* co_GetOwnFormat
*/
co_mFormat
*
co_GetOwnFormat
(
co_mFormat
*
format
)
{
format
->
m
=
0
;
format
->
b
.
bo
=
co_dHostByteOrder
;
format
->
b
.
ct
=
co_dHostAsciiType
;
format
->
b
.
ft
=
co_dHostFloatType
;
return
format
;
}
/*
* co_GetOwnPlatform
*/
co_sPlatform
*
co_GetOwnPlatform
(
co_sPlatform
*
platform
)
{
platform
->
os
=
co_dHostOS
;
...
...
@@ -22,13 +39,16 @@ co_sPlatform* co_GetOwnPlatform(co_sPlatform *platform)
return
platform
;
}
co_mFormat
*
co_GetOwnFormat
(
co_mFormat
*
format
)
/*
* co_SetFormat
*/
co_mFormat
*
co_SetFormat
(
co_mFormat
*
format
,
co_eBO
bo
,
co_eFT
ft
)
{
format
->
m
=
0
;
format
->
b
.
bo
=
co_dHostByteOrder
;
format
->
b
.
ft
=
co_dHostFloatType
;
format
->
b
.
ct
=
co_eCT_ascii
;
format
->
m
=
0
;
format
->
b
.
bo
=
bo
;
format
->
b
.
ft
=
ft
;
format
->
b
.
ct
=
co_eCT_ascii
;
return
format
;
return
format
;
}
src/lib/co/src/co_platform.h
View file @
7f9bce0b
#ifndef co_platform_h
#define co_platform_h
#ifdef __cplusplus
extern
"C"
{
#endif
/* co_platform.h -- platform routines
PROVIEW/R
...
...
@@ -13,6 +9,10 @@ extern "C" {
This module contains data structures that descibes a PROVIEW platform
*/
#ifdef __cplusplus
extern
"C"
{
#endif
#ifndef pwr_h
# include "pwr.h"
...
...
@@ -55,15 +55,17 @@ extern "C" {
#define ENDIAN_SWAP_BOOLP(s) (*(int *)s = (0 != *(int *)s))
/** OS type
* @note Do not change the order. Must be backward compatible
*/
typedef
enum
{
co_eOS__
=
0
,
co_eOS_Lynx
,
co_eOS_VMS
,
co_eOS_ELN
,
co_eOS_WNT
,
co_eOS_W95
,
co_eOS_Amiga
,
co_eOS_WNT
,
/**< Pay me and I will do it */
co_eOS_W95
,
/**< Never!! */
co_eOS_Amiga
,
/**< We are working on it ;-) */
co_eOS_Linux
,
co_eOS_
}
co_eOS
;
...
...
@@ -83,7 +85,9 @@ typedef enum {
#endif
/** Hardware type */
/** Hardware type
* @note Do not change the order. Must be backward compatible
*/
typedef
enum
{
co_eHW__
=
0
,
...
...
@@ -110,14 +114,20 @@ typedef enum {
/** Integer and floating-point byte order.
*
* @note The enum must not exceed 15
* Network is big endian
* 68k is big endian
* x86 is little endian
* PPC is both endian
* VAX is little endian
*
* @note Do not change the order. Must be backward compatible
*/
typedef
enum
{
co_eBO__
=
0
,
co_eBO_big
,
co_eBO_little
,
co_eBO_
co_eBO_
middle
/**< Not used, historical reasons */
}
co_eBO
;
...
...
@@ -128,8 +138,7 @@ typedef enum {
#endif
/** Character representation type. Currently not used
/** Character representation type. Always set to ascii
*
* @note The enum must not exceed 15
*/
...
...
@@ -142,15 +151,20 @@ typedef enum {
#define co_dHostAsciiType co_eCT_ascii
/** Floating-point representation type.
*
*
@note The enum must not exceed 255
*
@note Do not change the order. Must be backward compatible
*/
typedef
enum
{
co_eFT__
=
0
,
co_eFT_ieee
,
co_eFT_ieeeS
,
co_eFT_ieeeT
,
/**< Not used */
co_eFT_ieeeK
,
/**< Not used */
co_eFT_vaxF
,
/**< Not set, implicit for both vaxD and vaxG */
co_eFT_vaxD
,
co_eFT_vaxG
,
co_eFT_vaxH
,
/**< Not used */
co_eFT_
}
co_eFT
;
...
...
@@ -161,7 +175,7 @@ typedef enum {
# define co_dHostFloatType co_eFT_vaxD
# endif
#else
# define co_dHostFloatType co_eFT_ieee
# define co_dHostFloatType co_eFT_ieee
S
#endif
...
...
@@ -169,7 +183,7 @@ typedef union {
pwr_tBitMask
m
;
pwr_32Bits
(
pwr_Bits
(
bo
,
4
),,,,
/**< Byte order */
pwr_Bits
(
ct
,
4
),,,,
/**< Character representation */
pwr_Bits
(
ct
,
4
),,,,
/**<
Not used.
Character representation */
pwr_Bits
(
ft
,
8
),,,,,,,,
/**< Floting-point representation */
pwr_Bits
(
reserved1
,
8
),,,,,,,,
pwr_Bits
(
reserved2
,
8
),,,,,,,
...
...
@@ -178,8 +192,6 @@ typedef union {
}
co_mFormat
;
typedef
struct
{
co_eOS
os
;
co_eHW
hw
;
...
...
@@ -187,12 +199,14 @@ typedef struct {
}
co_sPlatform
;
co_sPlatform
*
co_GetOwnPlatform
(
co_sPlatform
*
platform
);
co_mFormat
*
co_GetOwnFormat
(
co_mFormat
*
format
);
co_mFormat
*
co_GetOwnFormat
(
co_mFormat
*
format
);
co_sPlatform
*
co_GetOwnPlatform
(
co_sPlatform
*
platform
);
co_mFormat
*
co_SetFormat
(
co_mFormat
*
format
,
co_eBO
bo
,
co_eFT
ft
);
#ifdef __cplusplus
}
#endif
#ifdef __cplusplus
...
...
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