85cbb94625
[INTERPRETER] * NEW: Support for "remote" debugging, i.e. debugging a process not run by the IDE. It is activated by the existence of a symbolic link named '/tmp/gambas-<project name>.debug' pointing at the IDE temporary directory. The symbolic link is destroyed by the debuggee, so that no other process of the same project can use it. * BUG: Remove support of two deprecated parameters in '.startup' file. * NEW: The internal common string buffer size is now equal to 'PATH_MAX'. [GB.DEBUG] * NEW: Support for "remote" debugging. * OPT: The debugger process now opens the output fifo in blocking mode when needed, and the debugged process opens the output fifo for reading when needed too.
64 lines
1.9 KiB
C
64 lines
1.9 KiB
C
/***************************************************************************
|
|
|
|
gb_common_buffer.h
|
|
|
|
(c) 2000-2017 Benoît Minisini <g4mba5@gmail.com>
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation; either version 2, or (at your option)
|
|
any later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with this program; if not, write to the Free Software
|
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
|
MA 02110-1301, USA.
|
|
|
|
***************************************************************************/
|
|
|
|
#ifndef __GB_COMMON_BUFFER_H
|
|
#define __GB_COMMON_BUFFER_H
|
|
|
|
#define COMMON_BUF_MAX PATH_MAX
|
|
|
|
#ifndef __COMMON_BUFFER_C
|
|
EXTERN int COMMON_pos;
|
|
EXTERN int COMMON_len;
|
|
EXTERN char COMMON_buffer[];
|
|
EXTERN char *COMMON_start;
|
|
EXTERN int COMMON_last;
|
|
#endif
|
|
|
|
void COMMON_init(void);
|
|
|
|
void COMMON_buffer_init(const char *str, int len);
|
|
void COMMON_jump_space(void);
|
|
bool COMMON_has_string(const char *str, int len);
|
|
|
|
#define COMMON_get_char(void) (COMMON_last = (COMMON_pos >= COMMON_len) ? (int)-1 : (int)(unsigned char)(COMMON_start[COMMON_pos++]))
|
|
|
|
#define COMMON_look_char() ((COMMON_pos >= COMMON_len) ? (int)-1 : (int)(unsigned char)(COMMON_start[COMMON_pos]))
|
|
|
|
#define COMMON_put_char(_c) \
|
|
({ \
|
|
if (COMMON_pos >= COMMON_len) \
|
|
(-1); \
|
|
else \
|
|
{ \
|
|
COMMON_start[COMMON_pos++] = (_c); \
|
|
0; \
|
|
} \
|
|
})
|
|
|
|
#define COMMON_last_char() (COMMON_last)
|
|
|
|
#define COMMON_get_current() (&COMMON_start[COMMON_pos])
|
|
|
|
#define COMMON_get_size_left(void) (COMMON_len - COMMON_pos)
|
|
|
|
#endif
|