Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
4061d1f8
Commit
4061d1f8
authored
Jan 20, 2009
by
Francois Gouget
Committed by
Alexandre Julliard
Jan 20, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winedbg: Make lexeme_alloc() static in debug.l.
parent
5012a572
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
29 deletions
+28
-29
debug.l
programs/winedbg/debug.l
+28
-28
debugger.h
programs/winedbg/debugger.h
+0
-1
No files found.
programs/winedbg/debug.l
View file @
4061d1f8
...
...
@@ -36,6 +36,34 @@
#undef YY_INPUT
static char** local_lexemes /* = NULL */;
static int next_lexeme /* = 0 */;
static int alloc_lexeme /* = 0 */;
char* lexeme_alloc_size(int size)
{
assert(0 <= next_lexeme && next_lexeme < alloc_lexeme + 1);
if (next_lexeme >= alloc_lexeme)
{
alloc_lexeme += 32;
local_lexemes = dbg_heap_realloc(local_lexemes, alloc_lexeme * sizeof(local_lexemes[0]));
assert(local_lexemes);
}
return local_lexemes[next_lexeme++] = HeapAlloc(GetProcessHeap(), 0, size + 1);
}
static char* lexeme_alloc(const char* lexeme)
{
char* ptr = lexeme_alloc_size(strlen(lexeme) + 1);
return strcpy(ptr, lexeme);
}
void lexeme_flush(void)
{
while (--next_lexeme >= 0) HeapFree(GetProcessHeap(), 0, local_lexemes[next_lexeme]);
next_lexeme = 0;
}
static int read_input(const char* pfx, char* buf, int size)
{
int len;
...
...
@@ -234,31 +262,3 @@ all { return tALL; }
#ifndef dbg_wrap
int dbg_wrap(void) { return 1; }
#endif
static char** local_lexemes /* = NULL */;
static int next_lexeme /* = 0 */;
static int alloc_lexeme /* = 0 */;
char* lexeme_alloc_size(int size)
{
assert(0 <= next_lexeme && next_lexeme < alloc_lexeme + 1);
if (next_lexeme >= alloc_lexeme)
{
alloc_lexeme += 32;
local_lexemes = dbg_heap_realloc(local_lexemes, alloc_lexeme * sizeof(local_lexemes[0]));
assert(local_lexemes);
}
return local_lexemes[next_lexeme++] = HeapAlloc(GetProcessHeap(), 0, size + 1);
}
char* lexeme_alloc(const char* lexeme)
{
char* ptr = lexeme_alloc_size(strlen(lexeme) + 1);
return strcpy(ptr, lexeme);
}
void lexeme_flush(void)
{
while (--next_lexeme >= 0) HeapFree(GetProcessHeap(), 0, local_lexemes[next_lexeme]);
next_lexeme = 0;
}
programs/winedbg/debugger.h
View file @
4061d1f8
...
...
@@ -308,7 +308,6 @@ extern HANDLE parser_generate_command_file(const char*, ...);
/* debug.l */
extern
void
lexeme_flush
(
void
);
extern
char
*
lexeme_alloc
(
const
char
*
);
extern
char
*
lexeme_alloc_size
(
int
);
/* display.c */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment