Changeset 658:50383e476c7e
- Timestamp:
- 10/06/08 10:22:11
(3 months ago)
- Author:
- Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
- branch:
- default
- Message:
Upgraded frontend to DMD 1.035
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r571 |
r658 |
|
| 35 | 35 | #include "../gen/logger.h" |
|---|
| 36 | 36 | |
|---|
| 37 | | extern void obj_includelib(char *name); |
|---|
| | 37 | extern void obj_includelib(const char *name); |
|---|
| 38 | 38 | void obj_startaddress(Symbol *s); |
|---|
| 39 | 39 | |
|---|
| r336 |
r658 |
|
| 478 | 478 | error("static class cannot inherit from nested class %s", baseClass->toChars()); |
|---|
| 479 | 479 | if (toParent2() != baseClass->toParent2()) |
|---|
| 480 | | error("super class %s is nested within %s, not %s", |
|---|
| | 480 | { |
|---|
| | 481 | if (toParent2()) |
|---|
| | 482 | { |
|---|
| | 483 | error("is nested within %s, but super class %s is nested within %s", |
|---|
| | 484 | toParent2()->toChars(), |
|---|
| 481 | 485 | baseClass->toChars(), |
|---|
| 482 | | baseClass->toParent2()->toChars(), |
|---|
| 483 | | toParent2()->toChars()); |
|---|
| | 486 | baseClass->toParent2()->toChars()); |
|---|
| | 487 | } |
|---|
| | 488 | else |
|---|
| | 489 | { |
|---|
| | 490 | error("is not nested, but super class %s is nested within %s", |
|---|
| | 491 | baseClass->toChars(), |
|---|
| | 492 | baseClass->toParent2()->toChars()); |
|---|
| | 493 | } |
|---|
| | 494 | isnested = 0; |
|---|
| | 495 | } |
|---|
| 484 | 496 | } |
|---|
| 485 | 497 | else if (!(storage_class & STCstatic)) |
|---|
| … | … | |
| 580 | 592 | */ |
|---|
| 581 | 593 | ctor = (CtorDeclaration *)search(0, Id::ctor, 0); |
|---|
| 582 | | if (ctor && ctor->toParent() != this) |
|---|
| | 594 | if (ctor && (ctor->toParent() != this || !ctor->isCtorDeclaration())) |
|---|
| 583 | 595 | ctor = NULL; |
|---|
| 584 | 596 | |
|---|
| r637 |
r658 |
|
| 707 | 707 | StringExp *es2 = (StringExp *)e2; |
|---|
| 708 | 708 | |
|---|
| 709 | | assert(es1->sz == es2->sz); |
|---|
| | 709 | if (es1->sz != es2->sz) |
|---|
| | 710 | { |
|---|
| | 711 | assert(global.errors); |
|---|
| | 712 | return EXP_CANT_INTERPRET; |
|---|
| | 713 | } |
|---|
| 710 | 714 | if (es1->len == es2->len && |
|---|
| 711 | 715 | memcmp(es1->string, es2->string, es1->sz * es1->len) == 0) |
|---|
| … | … | |
| 1345 | 1349 | int sz = es1->sz; |
|---|
| 1346 | 1350 | |
|---|
| 1347 | | assert(sz == es2->sz); |
|---|
| | 1351 | if (sz != es2->sz) |
|---|
| | 1352 | { |
|---|
| | 1353 | /* Can happen with: |
|---|
| | 1354 | * auto s = "foo"d ~ "bar"c; |
|---|
| | 1355 | */ |
|---|
| | 1356 | assert(global.errors); |
|---|
| | 1357 | return e; |
|---|
| | 1358 | } |
|---|
| 1348 | 1359 | s = mem.malloc((len + 1) * sz); |
|---|
| 1349 | 1360 | memcpy(s, es1->string, es1->len * sz); |
|---|
| r468 |
r658 |
|
| 899 | 899 | if (init) |
|---|
| 900 | 900 | { |
|---|
| | 901 | sc = sc->push(); |
|---|
| | 902 | sc->stc &= ~(STCconst | STCinvariant | STCpure); |
|---|
| | 903 | |
|---|
| 901 | 904 | ArrayInitializer *ai = init->isArrayInitializer(); |
|---|
| 902 | 905 | if (ai && tb->ty == Taarray) |
|---|
| … | … | |
| 1032 | 1035 | } |
|---|
| 1033 | 1036 | } |
|---|
| | 1037 | sc = sc->pop(); |
|---|
| 1034 | 1038 | } |
|---|
| 1035 | 1039 | } |
|---|
| r644 |
r658 |
|
| 141 | 141 | Dsymbol *parent = toParent(); |
|---|
| 142 | 142 | |
|---|
| | 143 | if (ident == Id::ctor && !isCtorDeclaration()) |
|---|
| | 144 | error("_ctor is reserved for constructors"); |
|---|
| | 145 | |
|---|
| 143 | 146 | if (isConst() || isAuto() || isScope()) |
|---|
| 144 | 147 | error("functions cannot be const or auto"); |
|---|
| … | … | |
| 2544 | 2547 | Expression *e = new IdentifierExp(0, id); |
|---|
| 2545 | 2548 | e = new AddAssignExp(0, e, new IntegerExp(-1)); |
|---|
| 2546 | | e = new EqualExp(TOKnotequal, 0, e, new IntegerExp(1)); |
|---|
| | 2549 | e = new EqualExp(TOKnotequal, 0, e, new IntegerExp(0)); |
|---|
| 2547 | 2550 | s = new IfStatement(0, NULL, e, new ReturnStatement(0, NULL), NULL); |
|---|
| 2548 | 2551 | sa->push(s); |
|---|
| r486 |
r658 |
|
| 165 | 165 | Identifier *Id::aaValues; |
|---|
| 166 | 166 | Identifier *Id::aaRehash; |
|---|
| | 167 | Identifier *Id::GNU_asm; |
|---|
| 167 | 168 | Identifier *Id::lib; |
|---|
| 168 | 169 | Identifier *Id::msg; |
|---|
| 169 | | Identifier *Id::GNU_asm; |
|---|
| 170 | 170 | Identifier *Id::intrinsic; |
|---|
| 171 | 171 | Identifier *Id::va_intrinsic; |
|---|
| … | … | |
| 347 | 347 | aaValues = Lexer::idPool("_aaValues"); |
|---|
| 348 | 348 | aaRehash = Lexer::idPool("_aaRehash"); |
|---|
| | 349 | GNU_asm = Lexer::idPool("GNU_asm"); |
|---|
| 349 | 350 | lib = Lexer::idPool("lib"); |
|---|
| 350 | 351 | msg = Lexer::idPool("msg"); |
|---|
| 351 | | GNU_asm = Lexer::idPool("GNU_asm"); |
|---|
| 352 | 352 | intrinsic = Lexer::idPool("intrinsic"); |
|---|
| 353 | 353 | va_intrinsic = Lexer::idPool("va_intrinsic"); |
|---|
| r486 |
r658 |
|
| 167 | 167 | static Identifier *aaValues; |
|---|
| 168 | 168 | static Identifier *aaRehash; |
|---|
| | 169 | static Identifier *GNU_asm; |
|---|
| 169 | 170 | static Identifier *lib; |
|---|
| 170 | 171 | static Identifier *msg; |
|---|
| 171 | | static Identifier *GNU_asm; |
|---|
| 172 | 172 | static Identifier *intrinsic; |
|---|
| 173 | 173 | static Identifier *va_intrinsic; |
|---|
| r486 |
r658 |
|
| 1 | 1 | |
|---|
| 2 | 2 | // Compiler implementation of the D programming language |
|---|
| 3 | | // Copyright (c) 1999-2006 by Digital Mars |
|---|
| | 3 | // Copyright (c) 1999-2008 by Digital Mars |
|---|
| 4 | 4 | // All Rights Reserved |
|---|
| 5 | 5 | // written by Walter Bright |
|---|
| … | … | |
| 23 | 23 | struct Msgtable |
|---|
| 24 | 24 | { |
|---|
| 25 | | char *ident; // name to use in DMD source |
|---|
| 26 | | char *name; // name in D executable |
|---|
| | 25 | const char *ident; // name to use in DMD source |
|---|
| | 26 | const char *name; // name in D executable |
|---|
| 27 | 27 | }; |
|---|
| 28 | 28 | |
|---|
| … | … | |
| 210 | 210 | |
|---|
| 211 | 211 | // For pragma's |
|---|
| | 212 | { "GNU_asm" }, |
|---|
| 212 | 213 | { "lib" }, |
|---|
| 213 | 214 | { "msg" }, |
|---|
| 214 | | { "GNU_asm" }, |
|---|
| 215 | 215 | |
|---|
| 216 | 216 | // LLVMDC pragma's |
|---|
| … | … | |
| 226 | 226 | { "llvmdc" }, |
|---|
| 227 | 227 | |
|---|
| 228 | | // For toHash/toString |
|---|
| | 228 | // For special functions |
|---|
| 229 | 229 | { "tohash", "toHash" }, |
|---|
| 230 | 230 | { "tostring", "toString" }, |
|---|
| … | … | |
| 261 | 261 | |
|---|
| 262 | 262 | for (i = 0; i < sizeof(msgtable) / sizeof(msgtable[0]); i++) |
|---|
| 263 | | { char *id = msgtable[i].ident; |
|---|
| | 263 | { const char *id = msgtable[i].ident; |
|---|
| 264 | 264 | |
|---|
| 265 | 265 | fprintf(fp," static Identifier *%s;\n", id); |
|---|
| … | … | |
| 286 | 286 | |
|---|
| 287 | 287 | for (i = 0; i < sizeof(msgtable) / sizeof(msgtable[0]); i++) |
|---|
| 288 | | { char *id = msgtable[i].ident; |
|---|
| 289 | | char *p = msgtable[i].name; |
|---|
| | 288 | { const char *id = msgtable[i].ident; |
|---|
| | 289 | const char *p = msgtable[i].name; |
|---|
| 290 | 290 | |
|---|
| 291 | 291 | if (!p) |
|---|
| … | … | |
| 298 | 298 | |
|---|
| 299 | 299 | for (i = 0; i < sizeof(msgtable) / sizeof(msgtable[0]); i++) |
|---|
| 300 | | { char *id = msgtable[i].ident; |
|---|
| 301 | | char *p = msgtable[i].name; |
|---|
| | 300 | { const char *id = msgtable[i].ident; |
|---|
| | 301 | const char *p = msgtable[i].name; |
|---|
| 302 | 302 | |
|---|
| 303 | 303 | if (!p) |
|---|
| r588 |
r658 |
|
| 78 | 78 | } |
|---|
| 79 | 79 | |
|---|
| 80 | | //printf("test2 %d, %p\n", semanticRun, scope); |
|---|
| 81 | 80 | if (semanticRun == 0 && scope) |
|---|
| 82 | 81 | { |
|---|
| 83 | 82 | semantic3(scope); |
|---|
| | 83 | if (global.errors) // if errors compiling this function |
|---|
| | 84 | return NULL; |
|---|
| 84 | 85 | } |
|---|
| 85 | 86 | if (semanticRun < 2) |
|---|
| r366 |
r658 |
|
| 89 | 89 | /************************* Token **********************************************/ |
|---|
| 90 | 90 | |
|---|
| 91 | | char *Token::tochars[TOKMAX]; |
|---|
| | 91 | const char *Token::tochars[TOKMAX]; |
|---|
| 92 | 92 | |
|---|
| 93 | 93 | void *Token::operator new(size_t size) |
|---|
| … | … | |
| 111 | 111 | #endif |
|---|
| 112 | 112 | |
|---|
| 113 | | char *Token::toChars() |
|---|
| 114 | | { char *p; |
|---|
| | 113 | const char *Token::toChars() |
|---|
| | 114 | { const char *p; |
|---|
| 115 | 115 | static char buffer[3 + 3 * sizeof(value) + 1]; |
|---|
| 116 | 116 | |
|---|
| … | … | |
| 240 | 240 | } |
|---|
| 241 | 241 | |
|---|
| 242 | | char *Token::toChars(enum TOK value) |
|---|
| 243 | | { char *p; |
|---|
| | 242 | const char *Token::toChars(enum TOK value) |
|---|
| | 243 | { const char *p; |
|---|
| 244 | 244 | static char buffer[3 + 3 * sizeof(value) + 1]; |
|---|
| 245 | 245 | |
|---|
| … | … | |
| 468 | 468 | { dchar_t dc; |
|---|
| 469 | 469 | |
|---|
| 470 | | char *q = utf_decodeChar((unsigned char *)p, len, &idx, &dc); |
|---|
| | 470 | const char *q = utf_decodeChar((unsigned char *)p, len, &idx, &dc); |
|---|
| 471 | 471 | if (q) |
|---|
| 472 | 472 | goto Linvalid; |
|---|
| … | … | |
| 719 | 719 | unsigned minor = 0; |
|---|
| 720 | 720 | |
|---|
| 721 | | for (char *p = global.version + 1; 1; p++) |
|---|
| | 721 | for (const char *p = global.version + 1; 1; p++) |
|---|
| 722 | 722 | { |
|---|
| 723 | 723 | char c = *p; |
|---|
| … | … | |
| 2187 | 2187 | if (d >= r) |
|---|
| 2188 | 2188 | break; |
|---|
| 2189 | | if (n && n * r + d <= n) |
|---|
| | 2189 | uinteger_t n2 = n * r; |
|---|
| | 2190 | //printf("n2 / r = %llx, n = %llx\n", n2/r, n); |
|---|
| | 2191 | if (n2 / r != n || n2 + d < n) |
|---|
| 2190 | 2192 | { |
|---|
| 2191 | 2193 | error ("integer overflow"); |
|---|
| … | … | |
| 2193 | 2195 | } |
|---|
| 2194 | 2196 | |
|---|
| 2195 | | n = n * r + d; |
|---|
| | 2197 | n = n2 + d; |
|---|
| 2196 | 2198 | p++; |
|---|
| 2197 | 2199 | } |
|---|
| … | … | |
| 2604 | 2606 | size_t len; |
|---|
| 2605 | 2607 | size_t idx; |
|---|
| 2606 | | char *msg; |
|---|
| | 2608 | const char *msg; |
|---|
| 2607 | 2609 | |
|---|
| 2608 | 2610 | c = *s; |
|---|
| … | … | |
| 2802 | 2804 | |
|---|
| 2803 | 2805 | struct Keyword |
|---|
| 2804 | | { char *name; |
|---|
| | 2806 | { const char *name; |
|---|
| 2805 | 2807 | enum TOK value; |
|---|
| 2806 | 2808 | }; |
|---|
| … | … | |
| 2929 | 2931 | { "__FILE__", TOKfile }, |
|---|
| 2930 | 2932 | { "__LINE__", TOKline }, |
|---|
| | 2933 | { "shared", TOKshared }, |
|---|
| 2931 | 2934 | #endif |
|---|
| 2932 | 2935 | }; |
|---|
| … | … | |
| 2954 | 2957 | |
|---|
| 2955 | 2958 | for (u = 0; u < nkeywords; u++) |
|---|
| 2956 | | { char *s; |
|---|
| | 2959 | { const char *s; |
|---|
| 2957 | 2960 | |
|---|
| 2958 | 2961 | //printf("keyword[%d] = '%s'\n",u, keywords[u].name); |
|---|
| r599 |
r658 |
|
| 159 | 159 | TOKline, |
|---|
| 160 | 160 | TOKfile, |
|---|
| | 161 | TOKshared, |
|---|
| 161 | 162 | #endif |
|---|
| 162 | 163 | |
|---|
| … | … | |
| 241 | 242 | #endif |
|---|
| 242 | 243 | |
|---|
| 243 | | static char *tochars[TOKMAX]; |
|---|
| | 244 | static const char *tochars[TOKMAX]; |
|---|
| 244 | 245 | static void *operator new(size_t sz); |
|---|
| 245 | 246 | |
|---|
| 246 | 247 | int isKeyword(); |
|---|
| 247 | 248 | void print(); |
|---|
| 248 | | char *toChars(); |
|---|
| 249 | | static char *toChars(enum TOK); |
|---|
| | 249 | const char *toChars(); |
|---|
| | 250 | static const char *toChars(enum TOK); |
|---|
| 250 | 251 | }; |
|---|
| 251 | 252 | |
|---|
| r651 |
r658 |
|
| 66 | 66 | copyright = "Copyright (c) 1999-2008 by Digital Mars and Tomas Lindquist Olsen"; |
|---|
| 67 | 67 | written = "written by Walter Bright and Tomas Lindquist Olsen"; |
|---|
| 68 | | version = "v1.034"; |
|---|
| | 68 | version = "v1.035"; |
|---|
| 69 | 69 | llvmdc_version = "0.1"; |
|---|
| 70 | 70 | global.structalign = 8; |
|---|
| r642 |
r658 |
|
| 790 | 790 | TypeBasic::TypeBasic(TY ty) |
|---|
| 791 | 791 | : Type(ty, NULL) |
|---|
| 792 | | { char *c; |
|---|
| 793 | | char *d; |
|---|
| | 792 | { const char *c; |
|---|
| | 793 | const char *d; |
|---|
| 794 | 794 | unsigned flags; |
|---|
| 795 | 795 | |
|---|
| … | … | |
| 936 | 936 | char *TypeBasic::toChars() |
|---|
| 937 | 937 | { |
|---|
| 938 | | return dstring; |
|---|
| | 938 | return (char *)dstring; |
|---|
| 939 | 939 | } |
|---|
| 940 | 940 | |
|---|
| r508 |
r658 |
|
| 267 | 267 | struct TypeBasic : Type |
|---|
| 268 | 268 | { |
|---|
| 269 | | char *dstring; |
|---|
| 270 | | char *cstring; |
|---|
| | 269 | const char *dstring; |
|---|
| | 270 | const char *cstring; |
|---|
| 271 | 271 | unsigned flags; |
|---|
| 272 | 272 | |
|---|
| r336 |
r658 |
|
| 2375 | 2375 | Token *t; |
|---|
| 2376 | 2376 | int braces; |
|---|
| | 2377 | int brackets; |
|---|
| 2377 | 2378 | |
|---|
| 2378 | 2379 | switch (token.value) |
|---|
| … | … | |
| 2462 | 2463 | |
|---|
| 2463 | 2464 | case TOKlbracket: |
|---|
| | 2465 | /* Scan ahead to see if it is an array initializer or |
|---|
| | 2466 | * an expression. |
|---|
| | 2467 | * If it ends with a ';', it is an array initializer. |
|---|
| | 2468 | */ |
|---|
| | 2469 | brackets = 1; |
|---|
| | 2470 | for (t = peek(&token); 1; t = peek(t)) |
|---|
| | 2471 | { |
|---|
| | 2472 | switch (t->value) |
|---|
| | 2473 | { |
|---|
| | 2474 | case TOKlbracket: |
|---|
| | 2475 | brackets++; |
|---|
| | 2476 | continue; |
|---|
| | 2477 | |
|---|
| | 2478 | case TOKrbracket: |
|---|
| | 2479 | if (--brackets == 0) |
|---|
| | 2480 | { t = peek(t); |
|---|
| | 2481 | if (t->value != TOKsemicolon && |
|---|
| | 2482 | t->value != TOKcomma && |
|---|
| | 2483 | t->value != TOKrcurly) |
|---|
| | 2484 | goto Lexpression; |
|---|
| | 2485 | break; |
|---|
| | 2486 | } |
|---|
| | 2487 | continue; |
|---|
| | 2488 | |
|---|
| | 2489 | case TOKeof: |
|---|
| | 2490 | break; |
|---|
| | 2491 | |
|---|
| | 2492 | default: |
|---|
| | 2493 | continue; |
|---|
| | 2494 | } |
|---|
| | 2495 | break; |
|---|
| | 2496 | } |
|---|
| | 2497 | |
|---|
| 2464 | 2498 | ia = new ArrayInitializer(loc); |
|---|
| 2465 | 2499 | nextToken(); |
|---|
| … | … | |
| 4248 | 4282 | if (token.value != TOKrbracket) |
|---|
| 4249 | 4283 | { |
|---|
| 4250 | | while (1) |
|---|
| | 4284 | while (token.value != TOKeof) |
|---|
| 4251 | 4285 | { |
|---|
| 4252 | 4286 | Expression *e = parseAssignExp(); |
|---|
| … | … | |
| 4526 | 4560 | switch (tk->value) |
|---|
| 4527 | 4561 | { |
|---|
| | 4562 | case TOKnot: |
|---|
| | 4563 | tk = peek(tk); |
|---|
| | 4564 | if (tk->value == TOKis) // !is |
|---|
| | 4565 | break; |
|---|
| 4528 | 4566 | case TOKdot: |
|---|
| 4529 | 4567 | case TOKplusplus: |
|---|
| 4530 | 4568 | case TOKminusminus: |
|---|
| 4531 | | case TOKnot: |
|---|
| 4532 | 4569 | case TOKdelete: |
|---|
| 4533 | 4570 | case TOKnew: |
|---|
| … | … | |
| 5150 | 5187 | { |
|---|
| 5151 | 5188 | s->addComment(combineComments(blockComment, token.lineComment)); |
|---|
| | 5189 | token.lineComment = NULL; |
|---|
| 5152 | 5190 | } |
|---|
| 5153 | 5191 | |
|---|
| r571 |
r658 |
|
| 189 | 189 | char *Object::toChars() |
|---|
| 190 | 190 | { |
|---|
| 191 | | return "Object"; |
|---|
| | 191 | return (char *)"Object"; |
|---|
| 192 | 192 | } |
|---|
| 193 | 193 | |
|---|
| … | … | |
| 313 | 313 | } |
|---|
| 314 | 314 | |
|---|
| 315 | | char *FileName::combine(char *path, char *name) |
|---|
| | 315 | char *FileName::combine(const char *path, const char *name) |
|---|
| 316 | 316 | { char *f; |
|---|
| 317 | 317 | size_t pathlen; |
|---|
| … | … | |
| 319 | 319 | |
|---|
| 320 | 320 | if (!path || !*path) |
|---|
| 321 | | return name; |
|---|
| | 321 | return (char *)name; |
|---|
| 322 | 322 | pathlen = strlen(path); |
|---|
| 323 | 323 | namelen = strlen(name); |
|---|
| … | … | |
| 745 | 745 | */ |
|---|
| 746 | 746 | |
|---|
| 747 | | char *FileName::searchPath(Array *path, char *name, int cwd) |
|---|
| | 747 | char *FileName::searchPath(Array *path, const char *name, int cwd) |
|---|
| 748 | 748 | { |
|---|
| 749 | 749 | if (absolute(name)) |
|---|
| 750 | 750 | { |
|---|
| 751 | | return exists(name) ? name : NULL; |
|---|
| | 751 | return exists(name) ? (char *)name : NULL; |
|---|
| 752 | 752 | } |
|---|
| 753 | 753 | if (cwd) |
|---|
| 754 | 754 | { |
|---|
| 755 | 755 | if (exists(name)) |
|---|
| 756 | | return name; |
|---|
| | 756 | return (char *)name; |
|---|
| 757 | 757 | } |
|---|
| 758 | 758 | if (path) |
|---|
| … | … | |
| 1439 | 1439 | } |
|---|
| 1440 | 1440 | |
|---|
| 1441 | | void OutBuffer::prependstring(char *string) |
|---|
| | 1441 | void OutBuffer::prependstring(const char *string) |
|---|
| 1442 | 1442 | { unsigned len; |
|---|
| 1443 | 1443 | |
|---|
| … | … | |
| 1699 | 1699 | */ |
|---|
| 1700 | 1700 | |
|---|
| 1701 | | unsigned OutBuffer::bracket(unsigned i, char *left, unsigned j, char *right) |
|---|
| | 1701 | unsigned OutBuffer::bracket(unsigned i, const char *left, unsigned j, const char *right) |
|---|
| 1702 | 1702 | { |
|---|
| 1703 | 1703 | size_t leftlen = strlen(left); |
|---|
| r336 |
r658 |
|
| 132 | 132 | static char *replaceName(char *path, char *name); |
|---|
| 133 | 133 | |
|---|
| 134 | | static char *combine(char *path, char *name); |
|---|
| | 134 | static char *combine(const char *path, const char *name); |
|---|
| 135 | 135 | static Array *splitPath(const char *path); |
|---|
| 136 | 136 | static FileName *defaultExt(const char *name, const char *ext); |
|---|
| … | … | |
| 139 | 139 | |
|---|
| 140 | 140 | void CopyTo(FileName *to); |
|---|
| 141 | | static char *searchPath(Array *path, char *name, int cwd); |
|---|
| | 141 | static char *searchPath(Array *path, const char *name, int cwd); |
|---|
| 142 | 142 | static int exists(const char *name); |
|---|
| 143 | 143 | static void ensurePathExists(const char *path); |
|---|
| … | … | |
| 268 | 268 | void writedstring(const char *string); |
|---|
| 269 | 269 | void writedstring(const wchar_t *string); |
|---|
| 270 | | void prependstring(char *string); |
|---|
| | 270 | void prependstring(const char *string); |
|---|
| 271 | 271 | void writenl(); // write newline |
|---|
| 272 | 272 | void writeByte(unsigned b); |
|---|
| … | … | |
| 289 | 289 | #endif |
|---|
| 290 | 290 | void bracket(char left, char right); |
|---|
| 291 | | unsigned bracket(unsigned i, char *left, unsigned j, char *right); |
|---|
| | 291 | unsigned bracket(unsigned i, const char *left, unsigned j, const char *right); |
|---|
| 292 | 292 | void spread(unsigned offset, unsigned nbytes); |
|---|
| 293 | 293 | unsigned insert(unsigned offset, const void *data, unsigned nbytes); |
|---|