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
8881dae8
Commit
8881dae8
authored
Mar 14, 2008
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Comment end was lost and int conversion resulted in exception
parent
7aac6112
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
8 deletions
+32
-8
java/jpwr/jop/src/GeCFormat.java
java/jpwr/jop/src/GeCFormat.java
+32
-8
No files found.
java/jpwr/jop/src/GeCFormat.java
View file @
8881dae8
/*
* Proview $Id: GeCFormat.java,v 1.
6 2007-05-24 12:26:07
claes Exp $
* Proview $Id: GeCFormat.java,v 1.
7 2008-03-14 08:33:39
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -126,8 +126,16 @@ public class GeCFormat {
return
format_type
;
}
public
StringBuffer
format
(
float
value
,
StringBuffer
buff
)
{
if
(
pfo
!=
null
)
return
pfo
.
sprintf
(
value
,
buff
);
if
(
pfo
!=
null
)
{
try
{
return
pfo
.
sprintf
(
value
,
buff
);
}
catch
(
IllegalArgumentException
e
)
{
buff
.
setLength
(
0
);
buff
.
append
(
"format error"
);
return
buff
;
}
}
else
return
buff
;
/*
...
...
@@ -166,11 +174,19 @@ public class GeCFormat {
}
return buff;
}
*/
}
public
StringBuffer
format
(
int
value
,
StringBuffer
buff
)
{
if ( pfo != null)
return pfo.sprintf( value, buff);
if
(
pfo
!=
null
)
{
try
{
return
pfo
.
sprintf
(
value
,
buff
);
}
catch
(
IllegalArgumentException
e
)
{
buff
.
setLength
(
0
);
buff
.
append
(
"format error"
);
return
buff
;
}
}
else
return
buff
;
/*
...
...
@@ -201,8 +217,16 @@ public class GeCFormat {
public
StringBuffer
format
(
String
value
,
StringBuffer
buff
)
{
switch
(
format_type
)
{
case
FRM_S:
{
if
(
pfo
!=
null
)
return
pfo
.
sprintf
(
value
,
buff
);
if
(
pfo
!=
null
)
{
try
{
return
pfo
.
sprintf
(
value
,
buff
);
}
catch
(
IllegalArgumentException
e
)
{
buff
.
setLength
(
0
);
buff
.
append
(
"format error"
);
return
buff
;
}
}
else
return
buff
;
/*
...
...
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