comparison dmd/module.c @ 336:aaade6ded589 trunk

[svn r357] Merged DMD 1.033
author lindquist
date Sat, 12 Jul 2008 19:38:31 +0200
parents 297690b5d4a5
children a34078905d01
comparison
equal deleted inserted replaced
335:17b844102023 336:aaade6ded589
104 versionids = NULL; 104 versionids = NULL;
105 versionidsNot = NULL; 105 versionidsNot = NULL;
106 106
107 macrotable = NULL; 107 macrotable = NULL;
108 escapetable = NULL; 108 escapetable = NULL;
109 doppelganger = 0;
109 cov = NULL; 110 cov = NULL;
110 covb = NULL; 111 covb = NULL;
111 112
112 srcfilename = FileName::defaultExt(filename, global.mars_ext); 113 srcfilename = FileName::defaultExt(filename, global.mars_ext);
113 if (!srcfilename->equalsExt(global.mars_ext)) 114 if (!srcfilename->equalsExt(global.mars_ext) &&
115 !srcfilename->equalsExt("dd"))
114 { 116 {
115 if (srcfilename->equalsExt("html") || 117 if (srcfilename->equalsExt("html") ||
116 srcfilename->equalsExt("htm") || 118 srcfilename->equalsExt("htm") ||
117 srcfilename->equalsExt("xhtml")) 119 srcfilename->equalsExt("xhtml"))
118 isHtml = 1; 120 isHtml = 1;
230 232
231 Module::~Module() 233 Module::~Module()
232 { 234 {
233 } 235 }
234 236
235 char *Module::kind() 237 const char *Module::kind()
236 { 238 {
237 return "module"; 239 return "module";
238 } 240 }
239 241
240 Module *Module::load(Loc loc, Array *packages, Identifier *ident) 242 Module *Module::load(Loc loc, Array *packages, Identifier *ident)
768 770
769 void Module::gensymfile() 771 void Module::gensymfile()
770 { 772 {
771 OutBuffer buf; 773 OutBuffer buf;
772 HdrGenState hgs; 774 HdrGenState hgs;
773 int i;
774 775
775 //printf("Module::gensymfile()\n"); 776 //printf("Module::gensymfile()\n");
776 777
777 buf.printf("// Sym file generated from '%s'", srcfile->toChars()); 778 buf.printf("// Sym file generated from '%s'", srcfile->toChars());
778 buf.writenl(); 779 buf.writenl();
779 780
780 for (i = 0; i < members->dim; i++) 781 for (int i = 0; i < members->dim; i++)
781 { 782 { Dsymbol *s = (Dsymbol *)members->data[i];
782 Dsymbol *s; 783
783
784 s = (Dsymbol *)members->data[i];
785 s->toCBuffer(&buf, &hgs); 784 s->toCBuffer(&buf, &hgs);
786 } 785 }
787 786
788 // Transfer image to file 787 // Transfer image to file
789 symfile->setbuffer(buf.data, buf.offset); 788 symfile->setbuffer(buf.data, buf.offset);
928 : ScopeDsymbol(ident) 927 : ScopeDsymbol(ident)
929 { 928 {
930 } 929 }
931 930
932 931
933 char *Package::kind() 932 const char *Package::kind()
934 { 933 {
935 return "package"; 934 return "package";
936 } 935 }
937 936
938 937