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
1b5e08ec
Commit
1b5e08ec
authored
17 years ago
by
edgrif
Browse files
Options
Downloads
Patches
Plain Diff
make some improvements/changes to magic stuff. could do more perhaps.
parent
c67b6927
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/include/ZMap/zmapUtils.h
+27
-22
27 additions, 22 deletions
src/include/ZMap/zmapUtils.h
with
27 additions
and
22 deletions
src/include/ZMap/zmapUtils.h
+
27
−
22
View file @
1b5e08ec
...
...
@@ -24,9 +24,9 @@
*
* Description: Utility functions for ZMap.
* HISTORY:
* Last edited: Oct 1
6
1
5:18
2007 (edgrif)
* Last edited: Oct 1
7
1
0:21
2007 (edgrif)
* Created: Thu Feb 26 10:33:10 2004 (edgrif)
* CVS info: $Id: zmapUtils.h,v 1.3
2
2007-10-1
6
15:
12:46
edgrif Exp $
* CVS info: $Id: zmapUtils.h,v 1.3
3
2007-10-1
7
15:
48:00
edgrif Exp $
*-------------------------------------------------------------------
*/
#ifndef ZMAP_UTILS_H
...
...
@@ -65,27 +65,41 @@
* @{
* */
/*! You can use ZMAP_MAKESTRING() to create a string version of a number:
*
* ZMAP_MAKESTRING(6) produces "6"
*
* n.b. the indirection of ZMAP_PUTSTRING() is required because of the
* way the ANSI preprocessor handles strings */
#define ZMAP_PUTSTRING(x) #x
#define ZMAP_MAKESTRING(x) ZMAP_PUTSTRING(x)
/*!
* Represents a ZMap logging object which will log messages, open/close the log etc. */
typedef
struct
_ZMapLogStruct
*
ZMapLog
;
/*!
* ZMagMagic
Ptr_t
: the type that all magic symbols are declared of.
* ZMagMagic: the type that all magic symbols are declared of.
* They become magic (i.e. unique) by using the pointer
* to that unique symbol, which has been placed somewhere
* in the address space by the compiler.
* to that unique symbol. (Declaring the string as static guarantees that it is
* unique as it can only be referenced in the file where it is declared.)
*
* Type-magics should be defined like this:
*
*
magic_t MYTYPE
_MAGIC
=
"MYTYPE";
*
ZMAP_DEFINE_NEW
_MAGIC
(
"MYTYPE"
)
;
*
* The address of the string is then used as the unique
*
identifier (as type->magic or graphAssXxx-code), and the
* string can be used during debugging
*/
* The address of the string is then used as the unique
identifier and the string
*
can be used during debugging.
*/
typedef
char
*
ZMapMagic
;
#define ZMAP_
DEFINE_NEW_MAGIC(magic_name)
static ZMapMagic magic_name = __FILE__
#define ZMAP_
ASSERT_MAGICAL(stored, statix) zMapAssert((stored) == &(statix
))
#define ZMAP_
MAGIC_NEW(magic_var_name, type_name)
static ZMapMagic magic_
var_
name =
ZMAP_MAKESTRING((type_name)) " in file "
__FILE__
#define ZMAP_
MAGIC_IS_VALID(magic_var_name, magic_ptr) ((magic_var_name) == (magic_ptr
))
#define ZMAP_MAGIC_ASSERT(magic_var_name, magic_ptr) zMapAssert(ZMAP_MAGIC_IS_VALID((magic_var_name), (magic_ptr)))
...
...
@@ -106,6 +120,7 @@ typedef enum
ZMAPTIME_USERFORMAT
/*!< Users provides format string. */
}
ZMapTimeFormat
;
typedef
struct
{
guint
source_id
;
...
...
@@ -132,16 +147,6 @@ gboolean zMapFileAccess(char *filepath) ;
gboolean
zMapFileEmpty
(
char
*
filepath
)
;
/* You can use ZMAP_MAKESTRING() to create a string version of a number:
*
* ZMAP_MAKESTRING(6) produces "6"
*
* n.b. the indirection of ZMAP_PUTSTRING() is required because of the
* way the ANSI preprocessor handles strings */
#define ZMAP_PUTSTRING(x) #x
#define ZMAP_MAKESTRING(x) ZMAP_PUTSTRING(x)
/* routines to return basic version/information about zmap. */
char
*
zMapGetAppName
(
void
)
;
char
*
zMapGetAppTitle
(
void
)
;
...
...
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