*** empty log message ***

This commit is contained in:
hyung-hwan 2005-06-06 03:54:32 +00:00
parent 9833d078dd
commit 93aee06d38
2 changed files with 30 additions and 5 deletions

View File

@ -1,5 +1,5 @@
/*
* $Id: parser.c,v 1.14 2005-06-06 03:47:34 bacon Exp $
* $Id: parser.c,v 1.15 2005-06-06 03:54:32 bacon Exp $
*/
#include <xp/stx/parser.h>
@ -9,6 +9,7 @@
static int __parse_method (
xp_stx_parser_t* parser,
xp_stx_word_t method_class, void* input);
static int __parse_message_pattern (xp_stx_parser_t* parser);
static int __get_token (xp_stx_parser_t* parser);
static int __get_ident (xp_stx_parser_t* parser);
@ -58,7 +59,6 @@ void xp_stx_parser_close (xp_stx_parser_t* parser)
#define GET_TOKEN(parser) \
do { if (__get_token(parser) == -1) return -1; } while (0)
int xp_stx_parser_parse_method (
xp_stx_parser_t* parser, xp_stx_word_t method_class, void* input)
{
@ -81,8 +81,13 @@ static int __parse_method (
{
GET_CHAR (parser);
GET_TOKEN (parser);
xp_printf (XP_TEXT("%d, [%s]\n"), parser->token.type, parser->token.buffer);
if (__parse_message_pattern (parser) == -1) return -1;
return 0;
}
static int __parse_messge_pattern (xp_stx_parser_t* parser)
{
return 0;
}

View File

@ -10,6 +10,10 @@
#include <xp/stx/parser.h>
#ifdef __linux
#include <mcheck.h>
#endif
struct ss_t
{
const xp_stx_char_t* text;
@ -28,7 +32,7 @@ int ss_func (int cmd, void* owner, void* arg)
return 0;
}
else if (cmd == XP_STX_PARSER_INPUT_CLOSE) {
//ss_t* ss = (ss_t*)owner;
/*ss_t* ss = (ss_t*)owner; */
return 0;
}
else if (cmd == XP_STX_PARSER_INPUT_CONSUME) {
@ -77,7 +81,6 @@ int stdio_func (int cmd, void* owner, void* arg)
*c = XP_STX_CHAR_EOF;
}
else *c = t;
xp_printf (XP_TEXT("[%c]\n"), *c);
return 0;
}
else if (cmd == XP_STX_PARSER_INPUT_REWIND) {
@ -91,12 +94,19 @@ int xp_main (int argc, xp_char_t* argv[])
xp_stx_parser_t parser;
xp_stx_word_t i;
#ifdef __linux
mtrace ();
#endif
/*
#ifndef _DOS
if (xp_setlocale () == -1) {
printf ("cannot set locale\n");
return -1;
}
#endif
*/
if (xp_stx_parser_open(&parser) == XP_NULL) {
xp_printf (XP_TEXT("cannot open parser\n"));
@ -122,6 +132,16 @@ int xp_main (int argc, xp_char_t* argv[])
xp_stx_parser_close (&parser);
xp_printf (XP_TEXT("== End of program ==\n"));
#ifdef __linux
muntrace ();
#endif
{
char buf[1000];
snprintf (buf, sizeof(buf), "ls -l /proc/%u/fd", getpid());
system (buf);
}
return 0;
}