forked from old/legacy-imlib2
More changes. Still doesn't do anything.
SVN revision: 2717
This commit is contained in:
parent
28b3445f1a
commit
5c5e842517
|
@ -8,7 +8,7 @@ INCLUDES = -I/usr/X11R6/include \
|
|||
LIBOBJS = @LIBOBJS@
|
||||
|
||||
bin_PROGRAMS = bdox
|
||||
bdox_SOURCES = main.c dox.h hotspot.c
|
||||
bdox_SOURCES = main.c dox.h hotspot.c style.c utils.c
|
||||
bdox_LDADD = -lX11
|
||||
|
||||
EXTRA_DIST =
|
||||
|
|
|
@ -37,10 +37,10 @@ void add_hotspot( char *target, int x, int y, int w, int h );
|
|||
char *check_hotspot( int x, int y );
|
||||
void tidy_hotspots();
|
||||
|
||||
void load_dox( char *file );
|
||||
void parse_dox( char *file );
|
||||
|
||||
void load_dss( char *file );
|
||||
|
||||
int __find_string( char *haystack, char *needle );
|
||||
char *__stripwhitespace( char *str );
|
||||
char *__copystr( char *str, int start, int end );
|
||||
|
||||
#endif /* _DOX_H_ */
|
||||
|
|
|
@ -6,3 +6,9 @@ int main( int argc, char **argv )
|
|||
init_hotspot();
|
||||
return 0;
|
||||
}
|
||||
|
||||
void parse_args( int argc, char **argv )
|
||||
{
|
||||
printf( "We should parse the args\n" );
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
#include "dox.h"
|
||||
|
||||
void load_dss( char *file )
|
||||
{
|
||||
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
<page name="test">
|
||||
<link to="otherpage">Test Link</link>
|
||||
<nl/>
|
||||
Test text.
|
||||
<image from="testimg.png"/>
|
||||
</page>
|
|
@ -0,0 +1,37 @@
|
|||
#include "dox.h"
|
||||
|
||||
int __find_string( char *haystack, char *needle )
|
||||
{
|
||||
if( strstr( haystack, needle ) != NULL )
|
||||
return ( strstr( haystack, needle ) - haystack );
|
||||
return 0;
|
||||
}
|
||||
|
||||
char *__stripwhitespace( char *str )
|
||||
{
|
||||
int i, strt = 0, in_quote = 0;
|
||||
char *tmpstr = calloc( strlen(str)+1, sizeof(char) );
|
||||
for( i = 0; i < strlen(str); i++ )
|
||||
{
|
||||
if( str[i] == '\"' )
|
||||
in_quote = (in_quote == 0 ? 1 : 0);
|
||||
if( in_quote || ! isspace(*(str+i)) )
|
||||
tmpstr[strt++] = str[i];
|
||||
}
|
||||
strcpy( str, tmpstr );
|
||||
free(tmpstr);
|
||||
return str;
|
||||
}
|
||||
|
||||
char *__copystr( char *str, int start, int end )
|
||||
{
|
||||
int i = 0;
|
||||
char *rstr = calloc( 1024, sizeof( char ) );
|
||||
if( start <= end && end < strlen( str ) )
|
||||
{
|
||||
for( i = start; i <= end; i++ )
|
||||
rstr[i-start] = str[i];
|
||||
return rstr;
|
||||
}
|
||||
return NULL;
|
||||
}
|
Loading…
Reference in New Issue