cosmetics
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8988 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
33cfa55484
commit
797317163a
16 changed files with 90 additions and 103 deletions
|
|
@ -147,11 +147,11 @@ scanner_locator(String *loc) {
|
|||
}
|
||||
#endif
|
||||
|
||||
/**************************************************************
|
||||
/* ----------------------------------------------------------------------------
|
||||
* scanner_init()
|
||||
*
|
||||
* Initialize buffers
|
||||
**************************************************************/
|
||||
* ------------------------------------------------------------------------- */
|
||||
|
||||
void scanner_init() {
|
||||
yybuffer = (char *) malloc(YYBSIZE);
|
||||
|
|
@ -161,11 +161,11 @@ void scanner_init() {
|
|||
scanner_ccode = NewStringEmpty();
|
||||
}
|
||||
|
||||
/**************************************************************
|
||||
/* ----------------------------------------------------------------------------
|
||||
* scanner_file(FILE *f)
|
||||
*
|
||||
* Start reading from new file
|
||||
**************************************************************/
|
||||
* ------------------------------------------------------------------------- */
|
||||
void scanner_file(DOHFile *f) {
|
||||
InFile *in;
|
||||
|
||||
|
|
@ -180,11 +180,11 @@ void scanner_file(DOHFile *f) {
|
|||
cparse_line = 1;
|
||||
}
|
||||
|
||||
/**************************************************************
|
||||
/* ----------------------------------------------------------------------------
|
||||
* scanner_close()
|
||||
*
|
||||
* Close current input file and go to next
|
||||
**************************************************************/
|
||||
* ------------------------------------------------------------------------- */
|
||||
|
||||
void scanner_close() {
|
||||
InFile *p;
|
||||
|
|
@ -202,13 +202,13 @@ void scanner_close() {
|
|||
in_head = p;
|
||||
}
|
||||
|
||||
/**************************************************************
|
||||
/* ----------------------------------------------------------------------------
|
||||
* char nextchar()
|
||||
*
|
||||
* gets next character from input.
|
||||
* If we're in inlining mode, we actually retrieve a character
|
||||
* from inline_yybuffer instead.
|
||||
**************************************************************/
|
||||
* ------------------------------------------------------------------------- */
|
||||
|
||||
char nextchar() {
|
||||
int c = 0;
|
||||
|
|
@ -248,7 +248,7 @@ void retract(int n) {
|
|||
if (yylen < 0) yylen = 0;
|
||||
}
|
||||
|
||||
/**************************************************************
|
||||
/* ----------------------------------------------------------------------------
|
||||
* start_inline(char *text, int line)
|
||||
*
|
||||
* This grabs a chunk of text and tries to inline it into
|
||||
|
|
@ -257,7 +257,7 @@ void retract(int n) {
|
|||
*
|
||||
* If we're already in inlining mode, we will save the code
|
||||
* as a new fragment.
|
||||
**************************************************************/
|
||||
* ------------------------------------------------------------------------- */
|
||||
|
||||
void start_inline(char *text, int line) {
|
||||
InFile *in;
|
||||
|
|
@ -277,11 +277,11 @@ void start_inline(char *text, int line) {
|
|||
cparse_line = line;
|
||||
}
|
||||
|
||||
/**************************************************************
|
||||
/* ----------------------------------------------------------------------------
|
||||
* yycomment(char *, int line)
|
||||
*
|
||||
* Inserts a comment into a documentation entry.
|
||||
**************************************************************/
|
||||
* ------------------------------------------------------------------------- */
|
||||
|
||||
/*
|
||||
void yycomment(char *a, int b, int c) {
|
||||
|
|
@ -361,7 +361,7 @@ skip_balanced(int startchar, int endchar) {
|
|||
return;
|
||||
}
|
||||
|
||||
/**************************************************************
|
||||
/* ----------------------------------------------------------------------------
|
||||
* void skip_decl(void)
|
||||
*
|
||||
* This tries to skip over an entire declaration. For example
|
||||
|
|
@ -371,7 +371,7 @@ skip_balanced(int startchar, int endchar) {
|
|||
* or
|
||||
* friend ostream& operator<<(ostream&, const char *s) { };
|
||||
*
|
||||
**************************************************************/
|
||||
* ------------------------------------------------------------------------- */
|
||||
|
||||
void skip_decl(void) {
|
||||
char c;
|
||||
|
|
@ -507,12 +507,12 @@ static void get_escape() {
|
|||
return;
|
||||
}
|
||||
|
||||
/**************************************************************
|
||||
/* ----------------------------------------------------------------------------
|
||||
* int yylook()
|
||||
*
|
||||
* Lexical scanner.
|
||||
* See Aho,Sethi, and Ullman, pg. 106
|
||||
**************************************************************/
|
||||
* ------------------------------------------------------------------------- */
|
||||
|
||||
int yylook(void) {
|
||||
|
||||
|
|
@ -1036,11 +1036,11 @@ void scanner_next_token(int tok) {
|
|||
next_token = tok;
|
||||
}
|
||||
|
||||
/**************************************************************
|
||||
/* ----------------------------------------------------------------------------
|
||||
* int yylex()
|
||||
*
|
||||
* Gets the lexene and returns tokens.
|
||||
*************************************************************/
|
||||
* ------------------------------------------------------------------------- */
|
||||
|
||||
int yylex(void) {
|
||||
|
||||
|
|
|
|||
|
|
@ -27,12 +27,12 @@ static contract Rules[] = {
|
|||
{ NULL, NULL}
|
||||
};
|
||||
|
||||
/************************************************************************
|
||||
/* ----------------------------------------------------------------------------
|
||||
* class Contracts:
|
||||
*
|
||||
* This class defines the functions that need to be used in
|
||||
* "wrap by contract" module.
|
||||
*************************************************************************/
|
||||
* ------------------------------------------------------------------------- */
|
||||
|
||||
class Contracts : public Dispatcher {
|
||||
String *make_expression(String *s, Node *n);
|
||||
|
|
|
|||
|
|
@ -1454,9 +1454,9 @@ public:
|
|||
return ret;
|
||||
}
|
||||
|
||||
/***************************************************************************
|
||||
/* ----------------------------------------------------------------------------
|
||||
* BEGIN C++ Director Class modifications
|
||||
***************************************************************************/
|
||||
* ------------------------------------------------------------------------- */
|
||||
|
||||
/*
|
||||
* Modified polymorphism code for Ocaml language module.
|
||||
|
|
|
|||
|
|
@ -1061,38 +1061,38 @@ public:
|
|||
return SWIG_OK;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
*** OBJECT-ORIENTED FEATURES
|
||||
****************************************************************************
|
||||
*** These extensions provide a more object-oriented interface to C++
|
||||
*** classes and structures. The code here is based on extensions
|
||||
*** provided by David Fletcher and Gary Holt.
|
||||
***
|
||||
*** I have generalized these extensions to make them more general purpose
|
||||
*** and to resolve object-ownership problems.
|
||||
***
|
||||
*** The approach here is very similar to the Python module :
|
||||
*** 1. All of the original methods are placed into a single
|
||||
*** package like before except that a 'c' is appended to the
|
||||
*** package name.
|
||||
***
|
||||
*** 2. All methods and function calls are wrapped with a new
|
||||
*** perl function. While possibly inefficient this allows
|
||||
*** us to catch complex function arguments (which are hard to
|
||||
*** track otherwise).
|
||||
***
|
||||
*** 3. Classes are represented as tied-hashes in a manner similar
|
||||
*** to Gary Holt's extension. This allows us to access
|
||||
*** member data.
|
||||
***
|
||||
*** 4. Stand-alone (global) C functions are modified to take
|
||||
*** tied hashes as arguments for complex datatypes (if
|
||||
*** appropriate).
|
||||
***
|
||||
*** 5. Global variables involving a class/struct is encapsulated
|
||||
*** in a tied hash.
|
||||
***
|
||||
****************************************************************************/
|
||||
/* ----------------------------------------------------------------------------
|
||||
* OBJECT-ORIENTED FEATURES
|
||||
*
|
||||
* These extensions provide a more object-oriented interface to C++
|
||||
* classes and structures. The code here is based on extensions
|
||||
* provided by David Fletcher and Gary Holt.
|
||||
*
|
||||
* I have generalized these extensions to make them more general purpose
|
||||
* and to resolve object-ownership problems.
|
||||
*
|
||||
* The approach here is very similar to the Python module :
|
||||
* 1. All of the original methods are placed into a single
|
||||
* package like before except that a 'c' is appended to the
|
||||
* package name.
|
||||
*
|
||||
* 2. All methods and function calls are wrapped with a new
|
||||
* perl function. While possibly inefficient this allows
|
||||
* us to catch complex function arguments (which are hard to
|
||||
* track otherwise).
|
||||
*
|
||||
* 3. Classes are represented as tied-hashes in a manner similar
|
||||
* to Gary Holt's extension. This allows us to access
|
||||
* member data.
|
||||
*
|
||||
* 4. Stand-alone (global) C functions are modified to take
|
||||
* tied hashes as arguments for complex datatypes (if
|
||||
* appropriate).
|
||||
*
|
||||
* 5. Global variables involving a class/struct is encapsulated
|
||||
* in a tied hash.
|
||||
*
|
||||
* ------------------------------------------------------------------------- */
|
||||
|
||||
|
||||
void setclassname(Node *n) {
|
||||
|
|
|
|||
|
|
@ -2360,9 +2360,9 @@ public:
|
|||
|
||||
|
||||
|
||||
/*************************************************************************************
|
||||
/* ----------------------------------------------------------------------------
|
||||
* BEGIN C++ Director Class modifications
|
||||
************************************************************************************/
|
||||
* ------------------------------------------------------------------------- */
|
||||
|
||||
/* C++/Python polymorphism demo code, copyright (C) 2002 Mark Rose <mrose@stm.lbl.gov>
|
||||
*
|
||||
|
|
@ -2558,9 +2558,9 @@ public:
|
|||
return result;
|
||||
}
|
||||
|
||||
/*************************************************************************************
|
||||
/* ----------------------------------------------------------------------------
|
||||
* END of C++ Director Class modifications
|
||||
************************************************************************************/
|
||||
* ------------------------------------------------------------------------- */
|
||||
|
||||
|
||||
/* ------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -102,13 +102,13 @@ protected:
|
|||
AccessMode cplus_mode;
|
||||
};
|
||||
|
||||
/************************************************************************
|
||||
/* ----------------------------------------------------------------------------
|
||||
* class language:
|
||||
*
|
||||
* This class defines the functions that need to be supported by the
|
||||
* scripting language being used. The translator calls these virtual
|
||||
* functions to output different types of code for different languages.
|
||||
*************************************************************************/
|
||||
* ------------------------------------------------------------------------- */
|
||||
|
||||
class Language : public Dispatcher {
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -1324,14 +1324,14 @@ SwigType *SwigType_alttype(SwigType *t, int local_tmap) {
|
|||
}
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
*** * * * WARNING * * * ***
|
||||
*** ***
|
||||
*** Don't even think about modifying anything below this line unless you ***
|
||||
*** are completely on top of *EVERY* subtle aspect of the C++ type system ***
|
||||
*** and you are prepared to suffer endless hours of agony trying to ***
|
||||
*** debug the SWIG run-time type checker after you break it. ***
|
||||
******************************************************************************/
|
||||
/* ----------------------------------------------------------------------------
|
||||
* * * * WARNING * * * ***
|
||||
* ***
|
||||
* Don't even think about modifying anything below this line unless you ***
|
||||
* are completely on top of *EVERY* subtle aspect of the C++ type system ***
|
||||
* and you are prepared to suffer endless hours of agony trying to ***
|
||||
* debug the SWIG run-time type checker after you break it. ***
|
||||
* ------------------------------------------------------------------------- */
|
||||
|
||||
/* -----------------------------------------------------------------------------
|
||||
* SwigType_remember()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue