Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Z
zmap
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ensembl-gh-mirror
zmap
Commits
9e95b7a3
Commit
9e95b7a3
authored
15 years ago
by
edgrif
Browse files
Options
Downloads
Patches
Plain Diff
add trivial func to convert single digit to char representation.
parent
fadc31b4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/include/ZMap/zmapUtils.h
+4
-2
4 additions, 2 deletions
src/include/ZMap/zmapUtils.h
src/zmapUtils/zmapUtils.c
+21
-2
21 additions, 2 deletions
src/zmapUtils/zmapUtils.c
with
25 additions
and
4 deletions
src/include/ZMap/zmapUtils.h
+
4
−
2
View file @
9e95b7a3
...
...
@@ -24,9 +24,9 @@
*
* Description: Utility functions for ZMap.
* HISTORY:
* Last edited:
Dec 12 14:22
200
8
(edgrif)
* Last edited:
Mar 30 10:11
200
9
(edgrif)
* Created: Thu Feb 26 10:33:10 2004 (edgrif)
* CVS info: $Id: zmapUtils.h,v 1.3
8
200
8-12-15 14:06
:2
6
edgrif Exp $
* CVS info: $Id: zmapUtils.h,v 1.3
9
200
9-04-03 15:38
:2
1
edgrif Exp $
*-------------------------------------------------------------------
*/
#ifndef ZMAP_UTILS_H
...
...
@@ -167,6 +167,8 @@ gboolean zMapUtilsConfigDebug(char *debug_flag, gboolean *value) ;
char
*
zMapGetTimeString
(
ZMapTimeFormat
format
,
char
*
format_str_in
)
;
char
zMapInt2Char
(
int
num
)
;
gboolean
zMapStr2Bool
(
char
*
str
,
gboolean
*
bool_out
)
;
gboolean
zMapStr2Int
(
char
*
str_in
,
int
*
int_out
)
;
gboolean
zMapInt2Str
(
int
int_in
,
char
**
str_out
)
;
...
...
This diff is collapsed.
Click to expand it.
src/zmapUtils/zmapUtils.c
+
21
−
2
View file @
9e95b7a3
...
...
@@ -26,9 +26,9 @@
*
* Exported functions: See ZMap/zmapUtils.h
* HISTORY:
* Last edited:
Feb 9 09:5
1 2009 (edgrif)
* Last edited:
Mar 30 10:1
1 2009 (edgrif)
* Created: Fri Mar 12 08:16:24 2004 (edgrif)
* CVS info: $Id: zmapUtils.c,v 1.
29
2009-0
2
-0
9
1
0:07:05
edgrif Exp $
* CVS info: $Id: zmapUtils.c,v 1.
30
2009-0
4
-0
3
1
5:38:21
edgrif Exp $
*-------------------------------------------------------------------
*/
...
...
@@ -279,6 +279,25 @@ char *zMapGetTimeString(ZMapTimeFormat format, char *format_str_in)
/* Given an int between 0 and 9 returns the corresponding char representation,
* (surely this must exist somewhere ??).
*
* Returns '.' if number not in [0-9]
* */
char
zMapInt2Char
(
int
num
)
{
char
result
=
'.'
;
char
table
[]
=
{
'0'
,
'1'
,
'2'
,
'3'
,
'4'
,
'5'
,
'6'
,
'7'
,
'8'
,
'9'
}
;
if
(
num
>=
0
&&
num
<=
9
)
result
=
table
[
num
]
;
return
result
;
}
/* There follow a series of conversion routines. These are provided either
* because there are no existing ones or because the existing ones have
* arcane usage.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment