libmangle: src/m_ms.h File Reference

# src/m_ms.h File Reference

`#include "m_token.h"`

Go to the source code of this file.

## Data Structures
struct | sCached
struct | sMSCtx
## Defines
#define | ENCODING_TYPE_MS 1
#define | GET_CHAR(CTX) ((CTX)->pos == (CTX)->end ? 0 : (CTX)->pos[0])
| Get currently marked character from CTX.
#define | INC_CHAR(CTX) do { if ((CTX)->pos != (CTX)->end) (CTX)->pos++; } while (0)
| Increments ctx position.
#define | DEC_CHAR(CTX) do { if ((CTX)->pos != (CTX)->name) (CTX)->pos--; } while (0)
| Decrements ctx position.
#define | SKIP_CHAR(CTX, LEN) do { (CTX)->pos += (LEN); if ((CTX)->pos > (CTX)->end) (CTX)->pos=(CTX)->end; } while (0)
| Increments CTX position by LEN.
## Functions
uMToken * | libmangle_decode_ms_name (libmangle_gc_context_t *gc, const char *name)
char * | libmangle_encode_ms_name (libmangle_gc_context_t *gc, uMToken *tok)

## Define Documentation

#define DEC_CHAR | ( | CTX |  | ) | do { if ((CTX)->pos != (CTX)->name) (CTX)->pos--; } while (0)

Decrements ctx position.

Move marker to previous character if it is currently not the first via CTX.

#define ENCODING_TYPE_MS 1

#define GET_CHAR | ( | CTX |  | ) | ((CTX)->pos == (CTX)->end ? 0 : (CTX)->pos[0])

Get currently marked character from CTX.

Get character from at current possition via CTX.

#define INC_CHAR | ( | CTX |  | ) | do { if ((CTX)->pos != (CTX)->end) (CTX)->pos++; } while (0)

Increments ctx position.

Move marker to next character if it is currently not the last via CTX.

#define SKIP_CHAR | ( | CTX,
|  | LEN |  | ) | do { (CTX)->pos += (LEN); if ((CTX)->pos > (CTX)->end) (CTX)->pos=(CTX)->end; } while (0)

Increments CTX position by LEN.

Increments CTX marker by LEN characters, points to last character if marker is moved out of bounds.

## Function Documentation

uMToken* libmangle_decode_ms_name | ( | libmangle_gc_context_t * | gc,
|  | const char * | name |
| ) |  |  |

Decodes an MSVC export name.

Parameters:

  `[in]` | gc | sGcCtx pointer for collecting memory allocations.
  `[in]` | name | MSVC C++ mangled export string.

See also:
  libmangle_sprint_decl()
  libmangle_release_gc()
  uMToken

Returns:
  Token containing information about the mangled string, use libmangle_release_gc() to free after use.

Decodes an MSVC export name.

Parameters:

  `[in]` | gc | libmangle_gc_context_t pointer for collecting memory allocations.
  `[in]` | name | MSVC C++ mangled export string.

See also:
  libmangle_sprint_decl()
  libmangle_release_gc()
  libmangle_tokens_t

Returns:
  Token containing information about the mangled string, use libmangle_release_gc() to free after use.

char* libmangle_encode_ms_name | ( | libmangle_gc_context_t * | gc,
|  | uMToken * | tok |
| ) |  |  |