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
ab16c6f1
Commit
ab16c6f1
authored
15 years ago
by
rds
Browse files
Options
Downloads
Patches
Plain Diff
Simple new create file function
parent
d03ea001
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/zmapUtils/zmapIOOut.c
+35
-2
35 additions, 2 deletions
src/zmapUtils/zmapIOOut.c
with
35 additions
and
2 deletions
src/zmapUtils/zmapIOOut.c
+
35
−
2
View file @
ab16c6f1
...
...
@@ -27,9 +27,9 @@
*
* Exported functions: See ZMap/zmapIO.h
* HISTORY:
* Last edited:
Oct 17
16:
28
200
7
(
edgrif
)
* Last edited:
Sep 2
16:
05
200
8
(
rds
)
* Created: Mon Oct 15 13:50:02 2007 (edgrif)
* CVS info: $Id: zmapIOOut.c,v 1.
1
200
7-10-17 15:47:09 edgrif
Exp $
* CVS info: $Id: zmapIOOut.c,v 1.
2
200
9-05-11 07:59:13 rds
Exp $
*-------------------------------------------------------------------
*/
...
...
@@ -44,6 +44,10 @@ static void deAllocIOOut(ZMapIOOut out) ;
ZMAP_MAGIC_NEW
(
IO_valid_str_G
,
ZMapIOOutStruct
)
;
GQuark
zmapOutErrorDomain
(
void
)
{
return
g_quark_from_static_string
(
"zmap-out"
);
}
gboolean
zMapOutValid
(
ZMapIOOut
out
)
{
...
...
@@ -89,6 +93,35 @@ ZMapIOOut zMapOutCreateFD(int fd)
return
out
;
}
ZMapIOOut
zMapOutCreateFile
(
char
*
full_path
,
char
*
mode
,
GError
**
error_out
)
{
ZMapIOOut
out
=
NULL
;
GIOChannel
*
channel
;
GError
*
error
=
NULL
;
if
((
channel
=
g_io_channel_new_file
(
full_path
,
mode
,
&
error
))
&&
(
!
error
))
{
out
=
allocIOOut
(
ZMAPIO_FILE
);
out
->
output
.
channel
=
channel
;
}
else
if
(
error
)
{
if
(
error_out
)
*
error_out
=
error
;
}
else
{
if
(
error_out
)
*
error_out
=
g_error_new
(
zmapOutErrorDomain
(),
-
1
,
"Failed to open file '%s', mode '%s'. "
"No error returned from g_io_channel_new_file!"
,
full_path
,
mode
);
}
return
out
;
}
char
*
zMapOutGetStr
(
ZMapIOOut
out
)
{
...
...
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