Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
饶先宏
hdl4se
提交
77987d73
H
hdl4se
项目概览
饶先宏
/
hdl4se
通知
12
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
H
hdl4se
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
77987d73
编写于
5月 27, 2021
作者:
饶先宏
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
202105271450
上级
2e7afa6a
变更
17
隐藏空白更改
内联
并排
Showing
17 changed file
with
145 addition
and
39 deletion
+145
-39
bignumber/include/bignumber.h
bignumber/include/bignumber.h
+2
-2
bignumber/src/bignumber.c
bignumber/src/bignumber.c
+119
-13
examples/testbignumber/testbignumber.c
examples/testbignumber/testbignumber.c
+1
-1
hdl4secell/src/hdl4se_bind2.c
hdl4secell/src/hdl4se_bind2.c
+1
-1
hdl4secell/src/hdl4se_bind3.c
hdl4secell/src/hdl4se_bind3.c
+1
-1
hdl4secell/src/hdl4se_bind4.c
hdl4secell/src/hdl4se_bind4.c
+1
-1
hdl4secell/src/hdl4se_binop.c
hdl4secell/src/hdl4se_binop.c
+3
-3
hdl4secell/src/hdl4se_const.c
hdl4secell/src/hdl4se_const.c
+2
-2
hdl4secell/src/hdl4se_mux16.c
hdl4secell/src/hdl4se_mux16.c
+1
-1
hdl4secell/src/hdl4se_mux2.c
hdl4secell/src/hdl4se_mux2.c
+1
-1
hdl4secell/src/hdl4se_mux4.c
hdl4secell/src/hdl4se_mux4.c
+1
-1
hdl4secell/src/hdl4se_mux8.c
hdl4secell/src/hdl4se_mux8.c
+1
-1
hdl4secell/src/hdl4se_reg.c
hdl4secell/src/hdl4se_reg.c
+1
-1
hdl4secell/src/hdl4se_split2.c
hdl4secell/src/hdl4se_split2.c
+3
-3
hdl4secell/src/hdl4se_split4.c
hdl4secell/src/hdl4se_split4.c
+3
-3
hdl4secell/src/hdl4se_unop.c
hdl4secell/src/hdl4se_unop.c
+3
-3
hdl4secell/src/hdl4se_wire.c
hdl4secell/src/hdl4se_wire.c
+1
-1
未找到文件。
bignumber/include/bignumber.h
浏览文件 @
77987d73
...
...
@@ -70,7 +70,7 @@ typedef struct sIBigNumber {
int
(
*
AssignUint32
)(
HOBJECT
object
,
unsigned
int
value
);
int
(
*
AssignUint64
)(
HOBJECT
object
,
unsigned
long
long
value
);
int
(
*
AssignStr
)(
HOBJECT
object
,
const
char
*
str
,
const
char
**
nstr
);
int
(
*
AssignStr
)(
HOBJECT
object
,
const
char
*
str
,
const
char
**
nstr
,
int
autowidth
);
int
(
*
Clone
)(
HOBJECT
object
,
HOBJECT
src
);
int
(
*
CloneSubBits
)(
HOBJECT
object
,
HOBJECT
src
,
int
from
,
int
width
,
int
signexpand
);
...
...
@@ -166,7 +166,7 @@ typedef struct sIBigNumber {
static int _obj##_bn_AssignInt64(HOBJECT object, long long value); \
static int _obj##_bn_AssignUint32(HOBJECT object, unsigned int value); \
static int _obj##_bn_AssignUint64(HOBJECT object, unsigned long long value); \
static int _obj##_bn_AssignStr(HOBJECT object, const char* str, const char** nstr); \
static int _obj##_bn_AssignStr(HOBJECT object, const char* str, const char** nstr
, int autowidth
); \
static int _obj##_bn_Clone(HOBJECT object, HOBJECT src); \
static int _obj##_bn_CloneSubBits(HOBJECT object, HOBJECT src, int from, int width, int signexpand); \
static int _obj##_bn_Assign(HOBJECT object, HOBJECT src); \
...
...
bignumber/src/bignumber.c
浏览文件 @
77987d73
...
...
@@ -379,14 +379,23 @@ enum TOKEN_STATE {
TOKEN_HEX
};
static
int
bigint_bn_AssignStr
(
HOBJECT
object
,
const
char
*
str
,
const
char
**
nstr
)
#define MAXNUMWIDTH (1 << 30)
static
int
bigint_bn_AssignStr
(
HOBJECT
object
,
const
char
*
str
,
const
char
**
nstr
,
int
autowidth
)
{
int
width
,
objwidth
,
sign
;
enum
TOKEN_STATE
state
;
const
char
*
strt
=
str
;
int
numvalid
=
0
;
sBigInteger
*
pobj
;
pobj
=
(
sBigInteger
*
)
objectThis
(
object
);
width
=
-
1
;
objwidth
=
pobj
->
width
;
if
(
autowidth
==
0
&&
objwidth
<=
0
)
return
-
1
;
bigint_bn_SetWidth
(
object
,
64
,
0
);
state
=
TOKEN_INITIAL
;
sign
=
0
;
while
(
*
strt
!=
0
)
{
int
ch
=
*
strt
;
switch
(
state
)
{
...
...
@@ -402,11 +411,43 @@ static int bigint_bn_AssignStr(HOBJECT object, const char* str, const char **nst
}
break
;
case
TOKEN_NUM
:
{
if
(
ch
>=
'0'
&&
ch
<=
'9'
)
{
if
(
pobj
->
buf
[
pobj
->
buflen
-
1
]
>
(
1
<<
27
))
{
int
w
;
w
=
pobj
->
width
*
2
;
if
(
w
>
MAXNUMWIDTH
)
{
w
=
MAXNUMWIDTH
;
}
if
(
0
!=
bigint_bn_SetWidth
(
object
,
w
,
0
))
{
return
-
1
;
}
}
bigint_bn_MulInt32
(
object
,
object
,
10
);
bigint_bn_AddInt32
(
object
,
object
,
ch
-
'0'
);
}
else
if
(
ch
==
'\''
)
{
int
i
;
for
(
i
=
pobj
->
buflen
-
1
;
i
>
0
;
i
--
)
{
if
(
pobj
->
buf
[
i
]
!=
0
)
{
/* too large width of a number */
width
=
MAXNUMWIDTH
;
break
;
}
}
if
(
width
==
-
1
)
{
if
(
pobj
->
buf
[
0
]
>
MAXNUMWIDTH
)
{
width
=
MAXNUMWIDTH
;
}
else
{
width
=
pobj
->
buf
[
0
];
}
}
state
=
TOKEN_BASE
;
if
(
width
==
0
)
width
=
-
1
;
else
if
(
0
!=
bigint_bn_SetWidth
(
object
,
width
,
0
))
{
return
-
1
;
}
numvalid
=
0
;
}
else
{
...
...
@@ -414,7 +455,10 @@ static int bigint_bn_AssignStr(HOBJECT object, const char* str, const char **nst
}
}
break
;
case
TOKEN_BASE
:
{
if
(
ch
==
'b'
||
ch
==
'B'
)
{
if
(
ch
==
's'
||
ch
==
'S'
)
{
sign
=
1
;
}
else
if
(
ch
==
'b'
||
ch
==
'B'
)
{
bigint_bn_AssignInt32
(
object
,
0
);
state
=
TOKEN_BIN
;
}
...
...
@@ -439,8 +483,19 @@ static int bigint_bn_AssignStr(HOBJECT object, const char* str, const char **nst
}
break
;
case
TOKEN_BIN
:
{
if
(
ch
==
'0'
||
ch
==
'1'
)
{
bigint_bn_MulInt32
(
object
,
object
,
2
);
bigint_bn_AddInt32
(
object
,
object
,
ch
-
'0'
);
if
(
autowidth
&&
(
width
==
-
1
))
{
if
(
pobj
->
buf
[
pobj
->
buflen
-
1
]
>
(
1
<<
27
))
{
int
w
;
w
=
pobj
->
width
*
2
;
if
(
w
>
MAXNUMWIDTH
)
{
w
=
MAXNUMWIDTH
;
}
if
(
0
!=
bigint_bn_SetWidth
(
object
,
w
,
0
))
return
-
1
;
}
}
bigint_bn_MulUint32
(
object
,
object
,
2
);
bigint_bn_AddUint32
(
object
,
object
,
ch
-
'0'
);
numvalid
=
1
;
}
else
if
(
ch
==
'_'
)
{
...
...
@@ -451,8 +506,19 @@ static int bigint_bn_AssignStr(HOBJECT object, const char* str, const char **nst
}
break
;
case
TOKEN_OCT
:
{
if
(
ch
>=
'0'
&&
ch
<=
'7'
)
{
bigint_bn_MulInt32
(
object
,
object
,
8
);
bigint_bn_AddInt32
(
object
,
object
,
ch
-
'0'
);
if
(
autowidth
&&
(
width
==
-
1
))
{
if
(
pobj
->
buf
[
pobj
->
buflen
-
1
]
>
(
1
<<
27
))
{
int
w
;
w
=
pobj
->
width
*
2
;
if
(
w
>
MAXNUMWIDTH
)
{
w
=
MAXNUMWIDTH
;
}
if
(
0
!=
bigint_bn_SetWidth
(
object
,
w
,
0
))
return
-
1
;
}
}
bigint_bn_MulUint32
(
object
,
object
,
8
);
bigint_bn_AddUint32
(
object
,
object
,
ch
-
'0'
);
numvalid
=
1
;
}
else
if
(
ch
==
'_'
)
{
...
...
@@ -463,8 +529,19 @@ static int bigint_bn_AssignStr(HOBJECT object, const char* str, const char **nst
}
break
;
case
TOKEN_DEC
:
{
if
(
ch
>=
'0'
&&
ch
<=
'9'
)
{
bigint_bn_MulInt32
(
object
,
object
,
10
);
bigint_bn_AddInt32
(
object
,
object
,
ch
-
'0'
);
if
(
autowidth
&&
(
width
==
-
1
))
{
if
(
pobj
->
buf
[
pobj
->
buflen
-
1
]
>
(
1
<<
27
))
{
int
w
;
w
=
pobj
->
width
*
2
;
if
(
w
>
MAXNUMWIDTH
)
{
w
=
MAXNUMWIDTH
;
}
if
(
0
!=
bigint_bn_SetWidth
(
object
,
w
,
0
))
return
-
1
;
}
}
bigint_bn_MulUint32
(
object
,
object
,
10
);
bigint_bn_AddUint32
(
object
,
object
,
ch
-
'0'
);
numvalid
=
1
;
}
else
{
...
...
@@ -474,13 +551,24 @@ static int bigint_bn_AssignStr(HOBJECT object, const char* str, const char **nst
case
TOKEN_HEX
:
{
if
((
ch
>=
'0'
&&
ch
<=
'9'
)
||
(
ch
>=
'a'
&&
ch
<=
'f'
)
||
(
ch
>=
'A'
&&
ch
<=
'F'
))
{
numvalid
=
1
;
bigint_bn_MulInt32
(
object
,
object
,
16
);
if
(
autowidth
&&
(
width
==
-
1
))
{
if
(
pobj
->
buf
[
pobj
->
buflen
-
1
]
>
(
1
<<
27
))
{
int
w
;
w
=
pobj
->
width
*
2
;
if
(
w
>
MAXNUMWIDTH
)
{
w
=
MAXNUMWIDTH
;
}
if
(
0
!=
bigint_bn_SetWidth
(
object
,
w
,
0
))
return
-
1
;
}
}
bigint_bn_MulUint32
(
object
,
object
,
16
);
if
(
ch
>
'0'
&&
ch
<=
'9'
)
bigint_bn_Add
I
nt32
(
object
,
object
,
ch
-
'0'
);
bigint_bn_Add
Ui
nt32
(
object
,
object
,
ch
-
'0'
);
else
if
(
ch
>=
'a'
&&
ch
<=
'f'
)
bigint_bn_Add
I
nt32
(
object
,
object
,
ch
-
'a'
+
10
);
bigint_bn_Add
Ui
nt32
(
object
,
object
,
ch
-
'a'
+
10
);
else
if
(
ch
>=
'A'
&&
ch
<=
'F'
)
bigint_bn_Add
I
nt32
(
object
,
object
,
ch
-
'A'
+
10
);
bigint_bn_Add
Ui
nt32
(
object
,
object
,
ch
-
'A'
+
10
);
}
else
if
(
ch
==
'_'
)
{
}
...
...
@@ -497,7 +585,25 @@ static int bigint_bn_AssignStr(HOBJECT object, const char* str, const char **nst
lastnum:
if
(
nstr
!=
NULL
)
*
nstr
=
strt
;
bigint_bn_SetWidth
(
object
,
pobj
->
width
,
1
);
if
(
autowidth
&&
(
width
==
-
1
))
{
int
i
;
width
=
0
;
for
(
i
=
pobj
->
buflen
-
1
;
i
>=
0
;
i
--
)
{
if
(
pobj
->
buf
[
i
]
!=
0
)
{
width
=
actualwidth
(
pobj
->
buf
[
i
]);
width
+=
i
*
CELL_WIDTH
;
break
;
}
}
if
(
width
==
0
)
width
=
1
;
if
(
sign
==
0
)
width
++
;
}
else
{
width
=
pobj
->
width
;
}
bigint_bn_SetWidth
(
object
,
width
,
sign
);
return
0
;
}
...
...
examples/testbignumber/testbignumber.c
浏览文件 @
77987d73
...
...
@@ -44,7 +44,7 @@ int main(int argc, char* argv[])
const
char
*
nstr
=
testnumber
;
const
char
*
lstr
=
testnumber
;
/*
while (0 == objectCall
2(bignumber, AssignStr, lstr, &nstr
)) {
while (0 == objectCall
3(bignumber, AssignStr, lstr, &nstr, 1
)) {
objectCall3(bignumber, GetStr, 16, buf, 128);
printf("%s=%s, \nnext=%s\n", lstr, buf, nstr);
lstr = nstr;
...
...
hdl4secell/src/hdl4se_bind2.c
浏览文件 @
77987d73
...
...
@@ -137,7 +137,7 @@ static int hdl4se_bind2Create(const PARAMITEM* pParams, int paramcount, HOBJECT*
int
j
;
lstr
=
(
const
char
*
)
pParams
[
i
].
pvalue
;
for
(
j
=
0
;
j
<
BINDCOUNT
;
j
++
)
{
if
(
0
==
objectCall
2
(
temp
,
AssignStr
,
lstr
,
&
nstr
))
{
if
(
0
==
objectCall
3
(
temp
,
AssignStr
,
lstr
,
&
nstr
,
0
))
{
objectCall1
(
temp
,
GetInt32
,
&
pobj
->
inputwidth
[
j
]);
lstr
=
nstr
;
}
...
...
hdl4secell/src/hdl4se_bind3.c
浏览文件 @
77987d73
...
...
@@ -137,7 +137,7 @@ static int hdl4se_bind3Create(const PARAMITEM* pParams, int paramcount, HOBJECT*
int
j
;
lstr
=
(
const
char
*
)
pParams
[
i
].
pvalue
;
for
(
j
=
0
;
j
<
BINDCOUNT
;
j
++
)
{
if
(
0
==
objectCall
2
(
temp
,
AssignStr
,
lstr
,
&
nstr
))
{
if
(
0
==
objectCall
3
(
temp
,
AssignStr
,
lstr
,
&
nstr
,
0
))
{
objectCall1
(
temp
,
GetInt32
,
&
pobj
->
inputwidth
[
j
]);
lstr
=
nstr
;
}
...
...
hdl4secell/src/hdl4se_bind4.c
浏览文件 @
77987d73
...
...
@@ -137,7 +137,7 @@ static int hdl4se_bind4Create(const PARAMITEM* pParams, int paramcount, HOBJECT*
int
j
;
lstr
=
(
const
char
*
)
pParams
[
i
].
pvalue
;
for
(
j
=
0
;
j
<
BINDCOUNT
;
j
++
)
{
if
(
0
==
objectCall
2
(
temp
,
AssignStr
,
lstr
,
&
nstr
))
{
if
(
0
==
objectCall
3
(
temp
,
AssignStr
,
lstr
,
&
nstr
,
0
))
{
objectCall1
(
temp
,
GetInt32
,
&
pobj
->
inputwidth
[
j
]);
lstr
=
nstr
;
}
...
...
hdl4secell/src/hdl4se_binop.c
浏览文件 @
77987d73
...
...
@@ -151,7 +151,7 @@ static int hdl4se_binopCreate(const PARAMITEM* pParams, int paramcount, HOBJECT*
int
j
;
lstr
=
(
const
char
*
)
pParams
[
i
].
pvalue
;
for
(
j
=
0
;
j
<
INCOUNT
;
j
++
)
{
if
(
0
==
objectCall
2
(
temp
,
AssignStr
,
lstr
,
&
nstr
))
{
if
(
0
==
objectCall
3
(
temp
,
AssignStr
,
lstr
,
&
nstr
,
0
))
{
objectCall1
(
temp
,
GetInt32
,
&
pobj
->
in_width
[
j
]);
}
else
{
...
...
@@ -159,14 +159,14 @@ static int hdl4se_binopCreate(const PARAMITEM* pParams, int paramcount, HOBJECT*
}
lstr
=
nstr
;
}
if
(
0
==
objectCall
2
(
temp
,
AssignStr
,
lstr
,
&
nstr
))
{
if
(
0
==
objectCall
3
(
temp
,
AssignStr
,
lstr
,
&
nstr
,
0
))
{
objectCall1
(
temp
,
GetInt32
,
&
pobj
->
out_width
);
}
else
{
return
EIID_INVALIDPARAM
;
}
lstr
=
nstr
;
if
(
0
==
objectCall
2
(
temp
,
AssignStr
,
lstr
,
&
nstr
))
{
if
(
0
==
objectCall
3
(
temp
,
AssignStr
,
lstr
,
&
nstr
,
0
))
{
objectCall1
(
temp
,
GetInt32
,
&
pobj
->
op
);
}
else
{
...
...
hdl4secell/src/hdl4se_const.c
浏览文件 @
77987d73
...
...
@@ -111,13 +111,13 @@ static int hdl4se_constCreate(const PARAMITEM* pParams, int paramcount, HOBJECT*
IBigNumber
**
temp
=
bigintegerCreate
(
32
);
if
(
temp
!=
NULL
)
{
const
char
*
nstr
;
if
(
0
==
objectCall
2
(
temp
,
AssignStr
,
(
const
char
*
)
pParams
[
i
].
pvalue
,
&
nstr
))
{
if
(
0
==
objectCall
3
(
temp
,
AssignStr
,
(
const
char
*
)
pParams
[
i
].
pvalue
,
&
nstr
,
0
))
{
objectCall1
(
temp
,
GetInt32
,
&
pobj
->
width
);
}
if
(
pobj
->
width
<=
0
||
pobj
->
width
>
(
1
<<
24
))
return
-
1
;
pobj
->
out_data
=
bigintegerCreate
(
pobj
->
width
);
objectCall
2
(
pobj
->
out_data
,
AssignStr
,
nstr
,
NULL
);
objectCall
3
(
pobj
->
out_data
,
AssignStr
,
nstr
,
NULL
,
0
);
objectRelease
(
temp
);
}
}
...
...
hdl4secell/src/hdl4se_mux16.c
浏览文件 @
77987d73
...
...
@@ -134,7 +134,7 @@ static int hdl4se_mux16Create(const PARAMITEM* pParams, int paramcount, HOBJECT*
IBigNumber
**
temp
=
bigintegerCreate
(
32
);
if
(
temp
!=
NULL
)
{
const
char
*
nstr
;
if
(
0
==
objectCall
2
(
temp
,
AssignStr
,
(
const
char
*
)
pParams
[
i
].
pvalue
,
&
nstr
))
{
if
(
0
==
objectCall
3
(
temp
,
AssignStr
,
(
const
char
*
)
pParams
[
i
].
pvalue
,
&
nstr
,
0
))
{
objectCall1
(
temp
,
GetInt32
,
&
pobj
->
width
);
}
objectRelease
(
temp
);
...
...
hdl4secell/src/hdl4se_mux2.c
浏览文件 @
77987d73
...
...
@@ -136,7 +136,7 @@ static int hdl4se_mux2Create(const PARAMITEM* pParams, int paramcount, HOBJECT*
IBigNumber
**
temp
=
bigintegerCreate
(
32
);
if
(
temp
!=
NULL
)
{
const
char
*
nstr
;
if
(
0
==
objectCall
2
(
temp
,
AssignStr
,
(
const
char
*
)
pParams
[
i
].
pvalue
,
&
nstr
))
{
if
(
0
==
objectCall
3
(
temp
,
AssignStr
,
(
const
char
*
)
pParams
[
i
].
pvalue
,
&
nstr
,
0
))
{
objectCall1
(
temp
,
GetInt32
,
&
pobj
->
width
);
}
objectRelease
(
temp
);
...
...
hdl4secell/src/hdl4se_mux4.c
浏览文件 @
77987d73
...
...
@@ -134,7 +134,7 @@ static int hdl4se_mux4Create(const PARAMITEM* pParams, int paramcount, HOBJECT*
IBigNumber
**
temp
=
bigintegerCreate
(
32
);
if
(
temp
!=
NULL
)
{
const
char
*
nstr
;
if
(
0
==
objectCall
2
(
temp
,
AssignStr
,
(
const
char
*
)
pParams
[
i
].
pvalue
,
&
nstr
))
{
if
(
0
==
objectCall
3
(
temp
,
AssignStr
,
(
const
char
*
)
pParams
[
i
].
pvalue
,
&
nstr
,
0
))
{
objectCall1
(
temp
,
GetInt32
,
&
pobj
->
width
);
}
objectRelease
(
temp
);
...
...
hdl4secell/src/hdl4se_mux8.c
浏览文件 @
77987d73
...
...
@@ -134,7 +134,7 @@ static int hdl4se_mux8Create(const PARAMITEM* pParams, int paramcount, HOBJECT*
IBigNumber
**
temp
=
bigintegerCreate
(
32
);
if
(
temp
!=
NULL
)
{
const
char
*
nstr
;
if
(
0
==
objectCall
2
(
temp
,
AssignStr
,
(
const
char
*
)
pParams
[
i
].
pvalue
,
&
nstr
))
{
if
(
0
==
objectCall
3
(
temp
,
AssignStr
,
(
const
char
*
)
pParams
[
i
].
pvalue
,
&
nstr
,
0
))
{
objectCall1
(
temp
,
GetInt32
,
&
pobj
->
width
);
}
objectRelease
(
temp
);
...
...
hdl4secell/src/hdl4se_reg.c
浏览文件 @
77987d73
...
...
@@ -120,7 +120,7 @@ static int hdl4se_regCreate(const PARAMITEM* pParams, int paramcount, HOBJECT* p
IBigNumber
**
temp
=
bigintegerCreate
(
32
);
if
(
temp
!=
NULL
)
{
const
char
*
nstr
;
if
(
0
==
objectCall
2
(
temp
,
AssignStr
,
(
const
char
*
)
pParams
[
i
].
pvalue
,
&
nstr
))
{
if
(
0
==
objectCall
3
(
temp
,
AssignStr
,
(
const
char
*
)
pParams
[
i
].
pvalue
,
&
nstr
,
0
))
{
objectCall1
(
temp
,
GetInt32
,
&
pobj
->
width
);
}
objectRelease
(
temp
);
...
...
hdl4secell/src/hdl4se_split2.c
浏览文件 @
77987d73
...
...
@@ -140,7 +140,7 @@ static int hdl4se_split2Create(const PARAMITEM* pParams, int paramcount, HOBJECT
const
char
*
lstr
;
int
j
;
lstr
=
(
const
char
*
)
pParams
[
i
].
pvalue
;
if
(
0
==
objectCall
2
(
temp
,
AssignStr
,
lstr
,
&
nstr
))
{
if
(
0
==
objectCall
3
(
temp
,
AssignStr
,
lstr
,
&
nstr
,
0
))
{
objectCall1
(
temp
,
GetInt32
,
&
pobj
->
width
);
}
else
{
...
...
@@ -148,14 +148,14 @@ static int hdl4se_split2Create(const PARAMITEM* pParams, int paramcount, HOBJECT
}
lstr
=
nstr
;
for
(
j
=
0
;
j
<
SPLITCOUNT
;
j
++
)
{
if
(
0
==
objectCall
2
(
temp
,
AssignStr
,
lstr
,
&
nstr
))
{
if
(
0
==
objectCall
3
(
temp
,
AssignStr
,
lstr
,
&
nstr
,
0
))
{
objectCall1
(
temp
,
GetInt32
,
&
pobj
->
out_info
[
j
][
0
]);
}
else
{
return
-
1
;
}
lstr
=
nstr
;
if
(
0
==
objectCall
2
(
temp
,
AssignStr
,
lstr
,
&
nstr
))
{
if
(
0
==
objectCall
3
(
temp
,
AssignStr
,
lstr
,
&
nstr
,
0
))
{
objectCall1
(
temp
,
GetInt32
,
&
pobj
->
out_info
[
j
][
1
]);
}
else
{
...
...
hdl4secell/src/hdl4se_split4.c
浏览文件 @
77987d73
...
...
@@ -143,7 +143,7 @@ static int hdl4se_split4Create(const PARAMITEM* pParams, int paramcount, HOBJECT
const
char
*
lstr
;
int
j
;
lstr
=
(
const
char
*
)
pParams
[
i
].
pvalue
;
if
(
0
==
objectCall
2
(
temp
,
AssignStr
,
lstr
,
&
nstr
))
{
if
(
0
==
objectCall
3
(
temp
,
AssignStr
,
lstr
,
&
nstr
,
0
))
{
objectCall1
(
temp
,
GetInt32
,
&
pobj
->
width
);
}
else
{
...
...
@@ -151,14 +151,14 @@ static int hdl4se_split4Create(const PARAMITEM* pParams, int paramcount, HOBJECT
}
lstr
=
nstr
;
for
(
j
=
0
;
j
<
SPLITCOUNT
;
j
++
)
{
if
(
0
==
objectCall
2
(
temp
,
AssignStr
,
lstr
,
&
nstr
))
{
if
(
0
==
objectCall
3
(
temp
,
AssignStr
,
lstr
,
&
nstr
,
0
))
{
objectCall1
(
temp
,
GetInt32
,
&
pobj
->
out_info
[
j
][
0
]);
}
else
{
return
-
1
;
}
lstr
=
nstr
;
if
(
0
==
objectCall
2
(
temp
,
AssignStr
,
lstr
,
&
nstr
))
{
if
(
0
==
objectCall
3
(
temp
,
AssignStr
,
lstr
,
&
nstr
,
0
))
{
objectCall1
(
temp
,
GetInt32
,
&
pobj
->
out_info
[
j
][
1
]);
}
else
{
...
...
hdl4secell/src/hdl4se_unop.c
浏览文件 @
77987d73
...
...
@@ -137,21 +137,21 @@ static int hdl4se_unopCreate(const PARAMITEM* pParams, int paramcount, HOBJECT*
const
char
*
nstr
;
const
char
*
lstr
;
lstr
=
(
const
char
*
)
pParams
[
i
].
pvalue
;
if
(
0
==
objectCall
2
(
temp
,
AssignStr
,
lstr
,
&
nstr
))
{
if
(
0
==
objectCall
3
(
temp
,
AssignStr
,
lstr
,
&
nstr
,
0
))
{
objectCall1
(
temp
,
GetInt32
,
&
pobj
->
in_width
);
}
else
{
return
EIID_INVALIDPARAM
;
}
lstr
=
nstr
;
if
(
0
==
objectCall
2
(
temp
,
AssignStr
,
lstr
,
&
nstr
))
{
if
(
0
==
objectCall
3
(
temp
,
AssignStr
,
lstr
,
&
nstr
,
0
))
{
objectCall1
(
temp
,
GetInt32
,
&
pobj
->
out_width
);
}
else
{
return
EIID_INVALIDPARAM
;
}
lstr
=
nstr
;
if
(
0
==
objectCall
2
(
temp
,
AssignStr
,
lstr
,
&
nstr
))
{
if
(
0
==
objectCall
3
(
temp
,
AssignStr
,
lstr
,
&
nstr
,
0
))
{
objectCall1
(
temp
,
GetInt32
,
&
pobj
->
op
);
}
else
{
...
...
hdl4secell/src/hdl4se_wire.c
浏览文件 @
77987d73
...
...
@@ -125,7 +125,7 @@ static int hdl4se_wireCreate(const PARAMITEM* pParams, int paramcount, HOBJECT*
IBigNumber
**
temp
=
bigintegerCreate
(
32
);
if
(
temp
!=
NULL
)
{
const
char
*
nstr
;
if
(
0
==
objectCall
2
(
temp
,
AssignStr
,
(
const
char
*
)
pParams
[
i
].
pvalue
,
&
nstr
))
{
if
(
0
==
objectCall
3
(
temp
,
AssignStr
,
(
const
char
*
)
pParams
[
i
].
pvalue
,
&
nstr
,
0
))
{
objectCall1
(
temp
,
GetInt32
,
&
pobj
->
width
);
}
objectRelease
(
temp
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录