From c8afb5fe6985fea65aeaf2aae7ddf240c6d32541 Mon Sep 17 00:00:00 2001 From: cxl Date: Thu, 2 Oct 2008 10:30:41 +0000 Subject: [PATCH] License fixes git-svn-id: svn://ultimatepp.org/upp/trunk@502 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppbox/CppBase2/AUTHORS | 2 - uppbox/CppBase2/Base.cpp | 397 ------- uppbox/CppBase2/COPYING | 30 - uppbox/CppBase2/COPYING-PLAIN | 33 - uppbox/CppBase2/CppBase.h | 478 -------- uppbox/CppBase2/CppBase.upp | 20 - uppbox/CppBase2/Parser.cpp | 1432 ------------------------ uppbox/CppBase2/Pre.cpp | 176 --- uppbox/CppBase2/cpplex.cpp | 421 ------- uppbox/CppBase2/keyword.i | 81 -- uppbox/CppBase2/perf.txt | 9 - uppbox/Uvs2/AUTHORS | 2 - uppbox/Uvs2/COPYING | 30 - uppbox/Uvs2/COPYING-PLAIN | 33 - uppbox/Uvs2/DlgFiles.lay | 1 + uppbox/Uvs2/Uvs2.upp | 6 +- uppbox/Uvs2/init | 2 + uppbox/WinInstaller/AUTHORS | 2 - uppbox/WinInstaller/COPYING | 30 - uppbox/WinInstaller/COPYING-PLAIN | 33 - uppbox/WinInstaller/WinInstaller.upp | 34 +- uppbox/WinInstaller/init | 5 + uppbox/WinInstaller2/AUTHORS | 2 - uppbox/WinInstaller2/COPYING | 30 - uppbox/WinInstaller2/COPYING-PLAIN | 33 - uppbox/WinInstaller2/WinInstaller2.upp | 85 +- uppbox/WinInstaller2/init | 4 + uppbox/uppweb/AUTHORS | 2 - uppbox/uppweb/COPYING | 30 - uppbox/uppweb/COPYING-PLAIN | 33 - uppbox/uppweb/uppweb.upp | 6 +- 31 files changed, 71 insertions(+), 3411 deletions(-) delete mode 100644 uppbox/CppBase2/AUTHORS delete mode 100644 uppbox/CppBase2/Base.cpp delete mode 100644 uppbox/CppBase2/COPYING delete mode 100644 uppbox/CppBase2/COPYING-PLAIN delete mode 100644 uppbox/CppBase2/CppBase.h delete mode 100644 uppbox/CppBase2/CppBase.upp delete mode 100644 uppbox/CppBase2/Parser.cpp delete mode 100644 uppbox/CppBase2/Pre.cpp delete mode 100644 uppbox/CppBase2/cpplex.cpp delete mode 100644 uppbox/CppBase2/keyword.i delete mode 100644 uppbox/CppBase2/perf.txt delete mode 100644 uppbox/Uvs2/AUTHORS delete mode 100644 uppbox/Uvs2/COPYING delete mode 100644 uppbox/Uvs2/COPYING-PLAIN delete mode 100644 uppbox/WinInstaller/AUTHORS delete mode 100644 uppbox/WinInstaller/COPYING delete mode 100644 uppbox/WinInstaller/COPYING-PLAIN create mode 100644 uppbox/WinInstaller/init delete mode 100644 uppbox/WinInstaller2/AUTHORS delete mode 100644 uppbox/WinInstaller2/COPYING delete mode 100644 uppbox/WinInstaller2/COPYING-PLAIN create mode 100644 uppbox/WinInstaller2/init delete mode 100644 uppbox/uppweb/AUTHORS delete mode 100644 uppbox/uppweb/COPYING delete mode 100644 uppbox/uppweb/COPYING-PLAIN diff --git a/uppbox/CppBase2/AUTHORS b/uppbox/CppBase2/AUTHORS deleted file mode 100644 index f52ff393f..000000000 --- a/uppbox/CppBase2/AUTHORS +++ /dev/null @@ -1,2 +0,0 @@ -Mirek Fidler -Tomas Rylek \ No newline at end of file diff --git a/uppbox/CppBase2/Base.cpp b/uppbox/CppBase2/Base.cpp deleted file mode 100644 index 97613d8c7..000000000 --- a/uppbox/CppBase2/Base.cpp +++ /dev/null @@ -1,397 +0,0 @@ -#include "CppBase.h" - -#ifdef _MSC_VER -#pragma inline_depth(255) -#pragma optimize("t", on) -#endif - -#define LLOG(x) -#define LTIMING(x) // RTIMING(x) - -void CppWordsHash::AddWord(const String& s) -{ - int i = GetHashValue(s) & 127; - w[i >> 5] |= 1 << (i & 31); -} - -void CppWordsHash::AddWords(const char *s) -{ - CParser p(s); - while(p) - if(p.IsId()) - AddWord(p.ReadId()); - else - p.SkipTerm(); -} - -CppWordsHash AllCppWords() -{ - CppWordsHash h; - h.SetAll(); - return h; -} - -CppItem& CppNest::GetAdd(const String& _key, const String& _name) -{ - int i = key.Find(_key); - if(i < 0) { - key.Add(_key); - name.Add(_name); - return item.Add(); - } - return item[i]; -} - -bool CppBase::IsType(int i) const -{ - return GetKey(i) != "::"; -} - -Nestfo::Nestfo(const CppBase& base, int nesti) - : base(base), nesti(nesti) -{ - Init(); -} - -Nestfo::Nestfo(int nesti, const CppBase& base) - : base(base), nesti(nesti) -{ - Init(); -} - -Nestfo::Nestfo(const CppBase& base, const String& nest) - : base(base), nesti(base.Find(nest)) -{ - Init(); -} - -Nestfo::Nestfo(const Nestfo& f) - : base(f.base) -{ - nests <<= f.nests; - bvalid = nvalid = false; - nesti = f.nesti; -} - -void Nestfo::Init() -{ - bvalid = nvalid = false; -} - -void Nestfo::Bases(int i, Vector& g) -{ - LTIMING("GetBases"); - if(base.IsType(i)) { - const CppNest& n = base.nest[i]; - for(int i = 0; i < n.GetCount(); i++) { - const CppItem& im = n[i]; - if(im.IsType()) { - const char *q = im.qptype; - const char *b = q; - for(;;) { - if(*q == ';' || *q == '\0') { - if(b < q) { - int nq = base.Find(String(b, q)); - if(nq >= 0) - g.Add(nq); - } - if(*q == '\0') - return; - q++; - b = q; - } - else - q++; - } - } - } - } -} - -const Vector& Nestfo::GetBases() -{ - if(!bvalid) { - bvalid = true; - baselist.Clear(); - if(nesti < 0) - return baselist; - Vector b; - Index bi; - Bases(nesti, b); - while(b.GetCount()) { - Vector bb; - for(int i = 0; i < b.GetCount(); i++) { - int q = b[i]; - if(bi.Find(q) < 0) { - bi.Add(q); - Bases(b[i], bb); - } - } - b = bb; - } - for(int i = 0; i < bi.GetCount(); i++) - baselist.Add(base.GetKey(bi[i]) + "::"); - } - return baselist; -} - - -const Vector& Nestfo::GetNests() -{ - if(!nvalid) { - nvalid = true; - nests.Clear(); - if(nesti < 0) - return nests; - String nn = base.GetKey(nesti); - while(nn.GetCount()) { - if(nn[0] == ':' && nn.GetCount() == 2) { - nests.Add(nn); - return nests; - } - nests.Add(nn + "::"); - int q = nn.ReverseFind(':'); - nn.Trim(max(0, q - 1)); - } - nests.Add("::"); - } - return nests; -} - -String Qualify0(Nestfo& nf, const String& type) -{ - if(IsNull(type) || type == "const" || - type == "int" || type == "double" || type == "long" || type == "char" || type == "void") - return type; - const Vector& nd = nf.GetNests(); - if(type[0] == ':') { - if(nf.base.Find(type) >= 0) - return type; - } - else - if(nd.GetCount()) { - LTIMING("First test"); - String qt = nd[0] + type; - if(nf.base.Find(qt) >= 0) - return qt; - } - if(nf.GetNest() >= 0) { - int q = type.ReverseFind(':'); - if(q >= 0) { - LTIMING("Qualifying qualification"); - Nestfo hnf(nf); - hnf.NoBases(); - String qn = Qualify(hnf, type.Mid(0, max(q - 1, 0))); - if(qn[0] != ':') - return type; - int nesti = nf.base.Find(qn); - if(nesti < 0) - return type; - String tp = type.Mid(q + 1); - Nestfo nnf(nf.base, nesti); - const Vector& bs = nnf.GetBases(); - for(int i = 0; i < bs.GetCount(); i++) { - String qt = bs[i] + tp; - if(nf.base.Find(qt) >= 0) - return qt; - } - } - else { - const Vector& bs = nf.GetBases(); - for(int i = 0; i < bs.GetCount(); i++) { - String qt = bs[i] + type; - if(nf.base.Find(qt) >= 0) - return qt; - } - } - } - if(type[0] != ':') { - LTIMING("Testing nests"); - for(int i = 1; i < nd.GetCount(); i++) { - String qt = nd[i] + type; - if(nf.base.Find(qt) >= 0) - return qt; - } - } - return type; -} - -String Qualify(Nestfo& nf, const String& type) -{ - int q = nf.cache.Find(type); - if(q >= 0) - return nf.cache[q]; - String x = Qualify0(nf, type); - nf.cache.Add(type, x); - return x; -} - -String QualifyIds(Nestfo& nf, const String& k, CppWordsHash& w) -{ - String r; - CParser p(k); - Vector empty; - while(p) { - if(p.IsChar2(':', ':')) { - String t; - while(p.Char2(':', ':')) { - t << "::"; - if(p.IsId()) { - String id = p.ReadId(); - w.AddWord(id); - t << id; - } - } - Nestfo nnf(nf.GetNest(), nf.base); - t = Qualify(nnf, t); - if(iscid(*r.Last()) && iscid(*t)) - r << ' '; - r << t; - } - else - if(p.IsId()) { - String t = p.ReadId(); - w.AddWord(t); - while(p.Char2(':', ':')) { - t << "::"; - if(p.IsId()) { - String id = p.ReadId(); - w.AddWord(id); - t << id; - } - } - t = Qualify(nf, t); - if(iscid(*r.Last()) && iscid(*t)) - r << ' '; - r << t; - } - else { - int c = p.GetChar(); - r.Cat(c); - p.Spaces(); - } - } - return r; -} - -String Qualify(const CppBase& base, const String& nest, const String& type) -{ - CppWordsHash dummy; - Nestfo nf(base, nest); - return QualifyIds(nf, type, dummy); -} - -String QualifyKey(const CppBase& base, const String& nest, const String& type) -{ - CppWordsHash dummy; - Nestfo nf(base, nest); - return QualifyIds(nf, type, dummy); -} - -void QualifyTypes(Nestfo& nf, CppItem& m) -{ - m.qtype = QualifyIds(nf, m.type, m.words); - m.qptype = QualifyIds(nf, m.ptype, m.words); -} - -void QualifyTypes(CppBase& base, const String& nest, CppItem& m) -{ - Nestfo nf(base, nest); - QualifyTypes(nf, m); -} - -void QualifyPass1(CppBase& base, const CppWordsHash& words) -{ - LTIMING("Qualify1"); - for(int ni = 0; ni < base.GetCount(); ni++) { - CppNest& n = base[ni]; - Nestfo nf(base, ni); - for(int i = 0; i < n.GetCount(); i++) { - CppItem& m = n.item[i]; - if((m.words.IsAll() || (m.words & words)) && m.IsType()) { - m.words.Clear(); - QualifyTypes(nf, m); - } - } - } -} - -void QualifyPass2(CppBase& base, const CppWordsHash& words) -{ - LTIMING("Qualify2"); - for(int ni = 0; ni < base.GetCount(); ni++) { - CppNest& n = base[ni]; - Nestfo nf(base, ni); - Index rem; - for(int i = 0; i < n.GetCount(); i++) { - CppItem& m = n.item[i]; - if((m.words.IsAll() || (words & m.words)) && !m.IsType()) { - m.words.Clear(); - QualifyTypes(nf, m); - if(m.IsCode()) { - String k = n.key[i]; - String r = QualifyIds(nf, m.key, m.words); - if(k != r) { - int q = n.key.Find(r); - if(q >= 0 && q != i) - if(m.decla) { - m.pos.Append(n.item[q].pos); - rem.FindAdd(q); - n.key.Set(i, r); - } - else { - n.item[q].pos.Append(m.pos); - rem.FindAdd(i); - } - else - n.key.Set(i, r); - } - } - } - } - Vector rm = rem.PickKeys(); - Sort(rm); - n.Remove(rm); - } -} - -void Qualify(CppBase& base, const CppWordsHash& words) -{ - LTIMING("Qualify"); - QualifyPass1(base, words); - QualifyPass2(base, words); -} - -void Remove(CppBase& base, const Vector& pf) -{ - int ni = 0; - Vector file; - for(int i = 0; i < pf.GetCount(); i++) - file.Add(GetCppFileIndex(pf[i])); - while(ni < base.GetCount()) { - CppNest& n = base[ni]; - Vector nr; - for(int mi = 0; mi < n.GetCount(); mi++) { - CppItem& m = n.item[mi]; - int i = 0; - while(i < m.pos.GetCount()) - if(FindIndex(file, m.pos[i].file) >= 0) - m.pos.Remove(i); - else - i++; - if(m.pos.GetCount() == 0) - nr.Add(mi); - } - n.Remove(nr); - if(n.GetCount() == 0) - base.nest.Remove(ni); - else - ni++; - } -} - -void CppItem::Serialize(Stream& s) -{ - s % kind % access; - s % natural % at % tparam % param % pname % tname % type % ptype % virt % key; -} diff --git a/uppbox/CppBase2/COPYING b/uppbox/CppBase2/COPYING deleted file mode 100644 index 306c7974b..000000000 --- a/uppbox/CppBase2/COPYING +++ /dev/null @@ -1,30 +0,0 @@ -Copyright (C) 2005 Mirek Fidler, Tomas Rylek and various contributors (see AUTHORS) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies of the Software and its Copyright notices. In addition publicly -documented acknowledgment must be given that this software has been used if no -source code of this software is made available publicly. This includes -acknowledgments in either Copyright notices, Manuals, Publicity and Marketing -documents or any documentation provided with any product containing this -software. This License does not apply to any software that links to the -libraries provided by this software (statically or dynamically), but only to -the software provided. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ------------ - -Please see the COPYING.PLAIN for a plain-english explanation of this notice -and it's intent. diff --git a/uppbox/CppBase2/COPYING-PLAIN b/uppbox/CppBase2/COPYING-PLAIN deleted file mode 100644 index 5b4491072..000000000 --- a/uppbox/CppBase2/COPYING-PLAIN +++ /dev/null @@ -1,33 +0,0 @@ -Plain English Copyright Notice - -This file is not intended to be the actual License. The reason this file -exists is that we here are programmers and engineers. We aren't lawyers. We -provide licenses that we THINK say the right things, but we have our own -intentions at heart. This is a plain-english explanation of what those -intentions are, and if you follow them you will be within the "spirit" of -the license. - -The intent is for us to enjoy writing software that is useful to us (the -AUTHORS) and allow others to use it freely and also benefit from the work we -put into making it. We don't want to restrict others using it. They should -not *HAVE* to make the source code of the applications they write that -simply link to these libraries (be that statically or dynamically), or for -them to be limited as to what license they choose to use (be it open, closed -or anything else). But we would like to know you are using these libraries. -We simply would like to know that it has been useful to someone. This is why -we ask for acknowledgement of some sort. - -You can do what you want with the source of this software - it doesn't -matter. We still have it here for ourselves and it is open and free to use -and download and play with. It can't be taken away. We don't really mind what -you do with the source to your software. We would simply like to know that -you are using it - especially if it makes it to a commerical product. If you -simply e-mail all the AUTHORS (see COPYING and AUTHORS files) telling us, and -then make sure you include a paragraph or page in the manual or in the "About.." -box for the product with the copyright notice and state that you used this -software, we will be very happy. If you want to contribute back modifications -and fixes you may have made we will welcome those too with open arms (generally). -If you want help with changes needed, ports needed or features to be added, -arrangements can be easily made with some dialogue. - -Mirek Fidler diff --git a/uppbox/CppBase2/CppBase.h b/uppbox/CppBase2/CppBase.h deleted file mode 100644 index d778e1000..000000000 --- a/uppbox/CppBase2/CppBase.h +++ /dev/null @@ -1,478 +0,0 @@ -#ifndef DOCPP_H -#define DOCPP_H - -#include - -int GetCppFileIndex(const String& path); -const String& GetCppFile(int i); - -enum { - Tmarker_before_first = 255, -#define CPPID(x) tk_##x, -#include "keyword.i" -#undef CPPID -}; - -class CppWordsHash { - dword w[4]; - -public: - void Clear() { w[0] = w[1] = w[2] = w[3] = 0; } - void SetAll() { w[0] = w[1] = w[2] = w[3] = ~0; } - void AddWord(const String& s); - void AddWords(const char *s); - - bool operator&(const CppWordsHash& b) const { - return (w[0] & b.w[0]) | (w[1] & b.w[1]) | (w[2] & b.w[2]) | (w[3] & b.w[3]); - } - - bool IsAll() const { return (w[0] & w[1] & w[2] & w[3]) == (dword)~0; } - - CppWordsHash() { Clear(); } -}; - -CppWordsHash AllCppWords(); - -enum { - t_eof, - t_string = -200, - t_integer, - t_double, - t_character, - t_dblcolon, - t_mulass, - t_divass, - t_modass, - t_xorass, - t_neq, - t_dot_asteriks, - t_elipsis, - t_inc, - t_addass, - t_dec, - t_arrow_asteriks, - t_arrow, - t_subass, - t_and, - t_andass, - t_or, - t_orass, - t_eq, - t_shl, - t_shlass, - t_le, - t_shr, - t_shrass, - t_ge, - te_integeroverflow, - te_badcharacter, - te_badstring, -}; - -const char **CppKeyword(); -bool InScList(const char *s, const char *list); - -class LexSymbolStat -{ -public: - LexSymbolStat(); - void Reset(int minSymbol, int maxSymbol); - void IncStat(int symbol); - int GetStat(int symbol) const; - int SumStat(const Vector & symbols) const; - void Merge(const LexSymbolStat & other); - -private: - Vector v; - int minSymbol; -}; - - -class Lex { -#ifdef _DEBUG - const char *pp; -#endif - const char *ptr; - const char *pos; - - Index id; - Index ignore; - int endkey; - int braceslevel; - int ignore_low, ignore_high; - - struct Term : Moveable{ - const char *ptr; - int code; - String text; - double number; - }; - - bool statsCollected; - LexSymbolStat symbolStat; - BiVector term; - - - bool Char(int c) { if(*ptr == c) { ptr++; return true; } else return false; } - void AddCode(int code) { Term& tm = term.AddTail(); tm.code = code; tm.ptr = pos; } - void AssOp(int noass, int ass) { AddCode(Char('=') ? ass : noass); } - void Next(); - bool Prepare(int pos); - int GetCharacter(); -public: - int Code(int pos = 0); - bool IsId(int pos = 0); - String Id(int pos = 0); - int Int(int pos = 0); - double Double(int pos = 0); - int Chr(int pos = 0); - String Text(int pos = 0); - - void Get(int n = 1); - int GetCode() { int q = Code(); Get(); return q; } - String GetId() { String q = Id(); Get(); return q; } - int GetInt() { int q = Int(); Get(); return q; } - double GetDouble() { double q = Double(); Get(); return q; } - int GetChr() { int q = Chr(); Get(); return q; } - String GetText() { String q = Text(); Get(); return q; } - - int Id(const String& s) { return id.FindAdd(s) + 256; } - - int GetBracesLevel() const { return braceslevel; } - - const char *Pos(int pos = 0); - int operator[](int pos) { return Code(pos); } - operator int() { return Code(0); } - void operator++() { Get(); } - - void Init(const char *s, const Vector& ignore); - void StartStatCollection(); - const LexSymbolStat & FinishStatCollection(); - - Lex(); -}; - -struct SrcFile { - SrcFile(); - String text; - Vector linepos; - int preprocessorLinesRemoved; - int blankLinesRemoved; - int commentLinesRemoved; -}; - -SrcFile PreProcess(Stream& in); - -enum Kind { - STRUCT, - STRUCTTEMPLATE, - TYPEDEF, - CONSTRUCTOR, - DESTRUCTOR, - FUNCTION, - INSTANCEFUNCTION, - CLASSFUNCTION, - FUNCTIONTEMPLATE, - INSTANCEFUNCTIONTEMPLATE, - CLASSFUNCTIONTEMPLATE, - INLINEFRIEND, - VARIABLE, - INSTANCEVARIABLE, - CLASSVARIABLE, - ENUM, - MACRO, -}; - -inline bool IsCppType(int i) -{ - return i >= STRUCT && i <= TYPEDEF; -} - -inline bool IsCppCode(int i) { - return i >= CONSTRUCTOR && i <= INLINEFRIEND; -}; - -inline bool IsCppData(int i) { - return i >= VARIABLE && i <= ENUM; -} - -inline bool IsCppMacro(int i) { - return i == MACRO; -} - -inline bool IsCppTemplate(int i) { - return i == STRUCTTEMPLATE || i >= FUNCTIONTEMPLATE && i <= CLASSFUNCTIONTEMPLATE; -} - -enum { - PUBLIC, - PROTECTED, - PRIVATE, -}; - -struct CppPos : Moveable { - bool impl; - int line; - int file; - - String GetFile() const { return GetCppFile(file); } -// void Serialize(Stream& s) { s % impl % line % file; } - - CppPos() { line = 0; impl = false; } -}; - -struct CppSimpleItem { - String natural; - String type; - String qtype; - String tparam; - String param; - String pname; - String ptype; - String qptype; - String tname; - byte access; - byte kind; - int16 at; - bool virt; - bool decla; - - bool IsType() const { return IsCppType(kind); } - bool IsCode() const { return IsCppCode(kind); } - bool IsData() const { return IsCppData(kind); } - bool IsMacro() const { return IsCppMacro(kind); } - bool IsTemplate() const { return IsCppTemplate(kind); } - - CppSimpleItem() { decla = false; virt = false; at = 0; } -}; - -struct CppItem : CppSimpleItem { - Vector pos; - String key; - CppWordsHash words; - - void Serialize(Stream& s); - - CppItem() { words.SetAll(); } -}; - -struct CppNest { - int namespacel; - Index key; - Index name; - Array item; - - void Remove(const Vector& rm) { key.Remove(rm); name.Remove(rm); item.Remove(rm); } - int GetCount() const { return item.GetCount(); } - const CppItem& operator[](int i) const { return item[i]; } - CppItem& GetAdd(const String& key, const String& name); - - CppNest() { namespacel = 0; } -}; - -struct CppBase { - ArrayMap nest; - - CppNest& operator[](int i) { return nest[i]; } - int GetCount() const { return nest.GetCount(); } - const String& GetKey(int i) const { return nest.GetKey(i); } - void Clear() { nest.Clear(); } - int Find(const String& s) const { return nest.Find(s); } - CppNest& GetAdd(const String& s) { return nest.GetAdd(s); } - - bool IsType(int i) const; - -// Vector GetBases(int i) const; -}; - -class Parser { - struct Context { - int namespacel; - String nesting; - Vector tparam; - Index typenames; - int access; - bool noclass; - - void operator<<=(const Context& t); - - String Dump() const; - }; - - struct Decla { - bool s_static:1; - bool s_extern:1; - bool s_register:1; - bool s_auto:1; - bool s_mutable:1; - bool s_explicit:1; - bool s_virtual:1; - String name; - bool function:1; - bool type_def:1; - bool isfriend:1; - bool istemplate:1; - bool istructor:1; - bool isdestructor:1; - bool isptr:1; - bool nofn:1; - - String tnames; - String type; - String natural; - - Decla(); - }; - - struct Decl : Decla { - Array param; - }; - - struct RecursionCounter - { - int change; - int &count; - RecursionCounter(int &count_i, int change_i = 1) : - count(count_i), change(change_i) - { - count += change; - } - ~RecursionCounter() { count -= change; } - }; - - Context context; - SrcFile file; - Lex lex; - int filei; - bool inbody; - - Callback2 err; - - int lpos, line; - - CppBase *base; - - int RPtr(); - - bool Key(int code); - bool EatBody(); - - void Cv(); - String SimpleType(Decla& d); - void Qualifier(); - void ParamList(Decl& d); - void Declarator(Decl& d, const char *p); - void EatInitializers(); - Decl Type(); - void Vars(Array& r, const char *p, bool type_def, bool more); - Array Declaration(bool l0 = false, bool more = false); - void Elipsis(Decl& d); - Decl& Finish(Decl& d, const char *p); - bool Nest(const String& tp, const String& tn); - - String TemplateParams(String& pnames); - String TemplateParams(); - String TemplatePnames(); - String Name(String& h); - String Name(); - String Constant(); - String ReadOper(); - - int GetLine(const char *pos); - void Line(); - void Check(bool b, const char *err); - void CheckKey(int c); - - void SetNestCurrent(); - void NestBody(); - void Do(); - - CppItem& Item(const String& nesting, const String& item, const String& name, bool impl); - CppItem& Item(const String& nesting, const String& item, const String& name); - - CppItem& Fn(const Decl& d, const String& templ, bool body, int kind); - - struct Error {}; - - void ThrowError(const String& e); - void Resume(int bl); - - void MatchPars(); - bool TryDecl(); - void Statement(); - void Locals(const String& type); - String Tparam(int& q); - -public: - struct FunctionStat - { - FunctionStat(const String & nesting, - const CppItem & cppItem, - const LexSymbolStat &symbolStat, - int maxScopeDepth); - String nesting; - const CppItem & cppItem; - const LexSymbolStat &symbolStat; - int maxScopeDepth; - }; - - bool IsInBody() const { return inbody; } - - typedef Callback1 FnEndCallback; - - bool dobody; - String current_nest; - int current_namespacel; - String current_key; - CppItem current; - int currentScopeDepth; - int maxScopeDepth; - VectorMap local; - FnEndCallback whenFnEnd; - LexSymbolStat symbolsOutsideFunctions; - - const SrcFile &getPreprocessedFile() { return file; } - - void Do(Stream& s, const Vector& ignore, CppBase& base, const String& fn, - Callback2 err, const Vector& typenames = Vector()); - - Parser() : dobody(false) {} -}; - -String NoTemplatePars(const String& type); - -class Nestfo { - bool bvalid, nvalid; - Vector baselist; - Vector nests; - int nesti; - void Bases(int i, Vector& g); - void Init(); - -public: - const CppBase& base; - VectorMap cache; - - const Vector& GetBases(); - const Vector& GetNests(); - int GetNest() const { return nesti; } - void NoBases() { baselist.Clear(); bvalid = true; } - - Nestfo(const CppBase& base, int nesti = -1); - Nestfo(int nesti, const CppBase& base); - Nestfo(const CppBase& base, const String& nest); - Nestfo(const Nestfo& f); -}; - -String Qualify(Nestfo& nf, const String& type); -String Qualify(const CppBase& base, const String& nest, const String& type); -void QualifyTypes(CppBase& base, const String& nest, CppItem& m); -String QualifyKey(const CppBase& base, const String& nest, const String& type); - -void Qualify(CppBase& base, const CppWordsHash& words); - -void Parse(Stream& s, const Vector& ignore, CppBase& base, const String& fn, - Callback2 err); -void Remove(CppBase& base, const Vector& fn); - -#endif diff --git a/uppbox/CppBase2/CppBase.upp b/uppbox/CppBase2/CppBase.upp deleted file mode 100644 index 53ef4175e..000000000 --- a/uppbox/CppBase2/CppBase.upp +++ /dev/null @@ -1,20 +0,0 @@ -optimize_speed; - -uses - Core; - -file - CppBase.h, - keyword.i, - Pre.cpp, - cpplex.cpp, - Parser.cpp, - Base.cpp, - perf.txt, - Info readonly separator, - COPYING, - COPYING-PLAIN, - AUTHORS; - -mainconfig - "" = ""; diff --git a/uppbox/CppBase2/Parser.cpp b/uppbox/CppBase2/Parser.cpp deleted file mode 100644 index 49f4e0064..000000000 --- a/uppbox/CppBase2/Parser.cpp +++ /dev/null @@ -1,1432 +0,0 @@ -#include "CppBase.h" - -#ifdef _MSC_VER -#pragma inline_depth(255) -#pragma optimize("t", on) -#endif - - -#define LLOG(x) // LOG(x) -#define LTIMING(x) TIMING(x) - -bool InScList(const char *s, const char *list) -{ - for(;;) { - const char *q = s; - for(;;) { - if(*q == '\0' && *list == '\0') return true; - if(*q != *list) { - if(*q == '\0' && *list == ';') return true; - if(*list == '\0') return false; - break; - } - q++; - list++; - } - while(*list && *list != ';') list++; - if(*list == '\0') return false; - list++; - } -} - -inline const char *bew(const char *s, const char *t) -{ - while(*s) - if(*s++ != *t++) - return NULL; - return t; -} - -String FnItem(const char *s, const char *pname, const char *qname, const String& name) { - String res; - while(*s) { - while(*s && !iscid(*s) && *s != '~') - s++; - while(iscid(*s) || *s == '~') - res.Cat(*s++); - if(res == "operator") { - while(*s && *s != '(') { - if((byte)*s >= ' ') - res.Cat(*s); - s++; - } - break; - } - while(*s && (byte)*s <= ' ') - s++; - if(*s == '(' && (res == name || res == '~' + name)) - break; - res.Clear(); - } - while(*s) { - const char *w = bew(qname, s); - if(w && !iscid(*w)) { - if(iscid(*res.Last())) - res.Cat(' '); - res.Cat(name); - s = w; - } - else - if(iscid(*s)) { - String q; - while(iscid(*s)) - q.Cat(*s++); - if(q != "virtual" && q != "inline" && q != "static" && !InScList(q, pname)) { - if(iscid(*res.Last())) - res.Cat(' '); - res.Cat(q); - } - else - while((byte)*s <= ' ' && *s) s++; - } - else - if(*s == '=') { - s++; - int l = 0; - while(*s && !(l == 0 && (*s == ',' || *s == ')'))) { - if(*s == '(') - l++; - else - if(*s == ')') - l--; - s++; - } - } - else - if((byte)*s <= ' ') { - s++; - while((byte)*s <= ' ' && *s) - s++; - } - else - res.Cat(*s++); - } - return res; -} - -String Purify(const char *s, const char *qname, const String& name) { - String res; - while(*s) { - const char *w = bew(qname, s); - if(w) { - res.Cat(name); - s = w; - } - else - if(iscid(*s)) { - String q(*s++, 1); //!!! speed up! - while(iscid(*s)) - q.Cat(*s++); - if(q != "virtual" && q != "inline" && q != "static") - res.Cat(q); - else - while((byte)*s <= ' ' && *s) s++; - } - else - if((byte)*s <= ' ') { - s++; - res.Cat(' '); - while((byte)*s <= ' ' && *s) - s++; - } - else - res.Cat(*s++); - } - return TrimRight(res); -} - -String Purify(const char *s) { - String res; - while(*s) { - if(iscid(*s)) { - String q(*s++, 1); //!!! speed up! - while(iscid(*s)) - q.Cat(*s++); - if(q != "virtual" && q != "inline") - res.Cat(q); - else - while((byte)*s <= ' ' && *s) s++; - } - else - if((byte)*s <= ' ') { - s++; - res.Cat(' '); - while((byte)*s <= ' ' && *s) - s++; - } - else - res.Cat(*s++); - } - return TrimRight(res); -} - -void ScAdd(String& s, const String& a) -{ - if(a.IsEmpty()) return; - if(!s.IsEmpty()) - s << ';'; - s << a; -} - -String Parser::Context::Dump() const -{ - return "Nesting: " + nesting; -} - -Parser::FunctionStat::FunctionStat(const String & nesting, - const CppItem & cppItem, - const LexSymbolStat &symbolStat, - int maxScopeDepth) : - nesting(nesting), cppItem(cppItem), - symbolStat(symbolStat), maxScopeDepth(maxScopeDepth) -{ -} - -void Parser::Context::operator<<=(const Context& t) -{ - nesting = t.nesting; - typenames <<= t.typenames; - tparam <<= t.tparam; - access = t.access; - noclass = t.noclass; - namespacel = t.namespacel; -} - -Parser::Decla::Decla() -{ - function = type_def = false; - s_static = s_auto = s_register = s_extern = s_mutable = s_explicit = s_virtual = false; - isfriend = istemplate = istructor = isptr = nofn = false; -} - - -bool Parser::Key(int code) -{ - if(lex == code) { - ++lex; - return true; - } - return false; -} - -int Parser::GetLine(const char *p) -{ - int pos = p - ~file.text; - int l = 0; - int h = file.linepos.GetCount(); - while(l < h) { - int q = (l + h) / 2; - if(file.linepos[q] < pos) - l = q + 1; - else - h = q; - } - return l; -} - -void Parser::Line() -{ - int pos = lex.Pos() - ~file.text; - while(line + 1 < file.linepos.GetCount() && file.linepos[line + 1] <= pos) - line++; -} - -void Parser::ThrowError(const String& e) -{ - err(GetLine(lex.Pos()), e); - LLOG(e); - throw Error(); -} - -void Parser::Check(bool b, const char *err) -{ - if(!b) ThrowError(err); -} - -void Parser::CheckKey(int c) -{ - if(!Key(c)) ThrowError(Format("Missing %c", c)); -} - -String Parser::TemplateParams(String& param) -{ - const char *pos = lex.Pos(); - CheckKey('<'); - int level = 1; - String id; - bool gp = true; - while(lex != t_eof) { - if(lex.IsId() && gp) - id = lex.GetId(); - else - if(Key(',')) { - ScAdd(param, id); - id.Clear(); - gp = true; - } - else - if(Key('=')) { - if(!id.IsEmpty()) { - ScAdd(param, id); - id.Clear(); - } - gp = false; - } - else - if(Key('>')) { - level--; - if(level <= 0) { - ScAdd(param, id); - break; - } - } - else - if(Key('<')) - level++; - else - ++lex; - } - return String(pos, lex.Pos()); -} - -String Parser::TemplateParams() -{ - String dummy; - return TemplateParams(dummy); -} - -String Parser::TemplatePnames() -{ - String pnames; - TemplateParams(pnames); - return pnames; -} - -String Parser::ReadOper() { - const char *p = lex.Pos(); - const char *p1 = p; - Key(tk_operator); - int level = 0; - if(Key('(')) - level++; - for(;;) { - if(lex == t_eof || level <= 0 && lex == '(') break; - if(Key('(') || Key('[')) level++; - else - if(Key(')') || Key(']')) level--; - else - ++lex; - } - StringBuffer r; - while(p < lex.Pos()) { - if((byte)*p > ' ') - r.Cat(*p); - p++; - } - return r; -} - -String Parser::Name(String& name) -{ - String s; - if(Key(t_dblcolon)) { - s << "::"; - name = s; - } - Check(lex.IsId() || lex == tk_operator, "Name expected"); - for(;;) { - if(lex.IsId()) { - name << lex.Id(); - s << lex.GetId(); - } - else { - String h = ReadOper(); - name << h; - s << h; - break; - } - if(lex == '<') - s << TemplateParams(); - if(Key(t_dblcolon)) { - s << "::"; - name << "::"; - if(Key('~')) { - s << "~"; - name << "~"; - } - } - else - break; - } - return s; -} - -String Parser::Name() -{ - String h; - return Name(h); -} - -String Parser::Constant() -{ - const char *p = lex.Pos(); - const char *p1 = p; - int level = 0; - for(;;) { - p1 = lex.Pos(); - if(lex == t_eof) break; - if(level <= 0 && (lex == ',' || lex == ';' || lex == ')' || lex == '}' || lex == ']')) - break; - if(Key('(') || Key('[') || Key('{')) level++; - else - if(Key(')') || Key(']') || Key('}')) level--; - else - ++lex; - } - return String(p, p1); -} - -String Parser::SimpleType(Decla& d) -{ - if(Key(tk_struct) || Key(tk_class) || Key(tk_union) || Key(tk_enum) || Key(tk_typename)) { - if(lex.IsId() || lex == t_dblcolon) d.type = Name(); - if(lex == '{') EatBody(); - return Null; - } - if(Key(tk_bool) || Key(tk_float) || Key(tk_double) || Key(tk_void)) - return Null; - bool sgn = Key(tk_signed) || Key(tk_unsigned); - if(Key(tk_long)) { - Key(tk_long); - Key(tk_int) || Key(tk_double); - return Null; - } - if(Key(tk_short)) { - Key(tk_int); - return Null; - } - if(Key(tk_int) || Key(tk_char) || - Key(tk___int8) || Key(tk___int16) || Key(tk___int32) || Key(tk___int64)) return Null; - if(sgn) return Null; - const char *p = lex.Pos(); - int cs = 0; - Index cix; - if(Key(t_dblcolon)) - d.type << "::"; - Check(lex.IsId(), "Name expected"); - while(lex.IsId()) { - int q = FindIndex(context.tparam, lex[0]); - if(q >= 0) { - d.type << AsString(q); - ++lex; - break; - } - else { - d.type << lex.Id(); - if(cix.Find(lex) >= 0) - cs++; - else - cix.Add(lex); - ++lex; - if(lex == '<') - d.type << TemplateParams(); - if(Key(t_dblcolon)) { - d.type << "::"; - if(Key('~')) - cs = true; - } - else - break; - } - } - return cs ? String(p, lex.Pos()) : String(); -} - -void Parser::Qualifier() -{ - Key(tk_const); - Key(tk_volatile); - if(Key(tk_throw)) { - while(lex != t_eof && !Key(')')) - ++lex; - } -} - -void Parser::Elipsis(Decl& d) -{ - Decl& q = d.param.Add(); - q.name = "..."; - CheckKey(')'); -} - -void Parser::ParamList(Decl& d) { - if(!Key(')')) - for(;;) { - if(Key(t_elipsis)) { - Elipsis(d); - break; - } - else - d.param.Add() = Declaration().Top(); - if(Key(t_elipsis)) { - Elipsis(d); - break; - } - if(Key(')')) break; - CheckKey(','); - } -} - -int Parser::RPtr() -{ - int n = 0; - int q = 0; - int tlevel = 0; - for(;;) { - int t = lex[n]; - if(t == '*') return n + 1; - if(t == '<') { - tlevel++; - n++; - } - else - if(t == '>') { - tlevel--; - n++; - } - else - if(t == t_dblcolon || lex.IsId(n) || t == ',' && tlevel > 0) - n++; - else - return 0; - } -} - -void Parser::EatInitializers() -{ - if(Key(':')) { - while(lex != '{' && lex != t_eof) ++lex; - } -} - -void Parser::Declarator(Decl& d, const char *p) -{ - int n = RPtr(); - if(n) { - while(n--) lex.Get(); - Declarator(d, p); - d.isptr = true; - return; - } - if(Key('&')) { - Declarator(d, p); - return; - } - if(Key(tk_const)) { - Declarator(d, p); - return; - } - if(Key('(')) { - Declarator(d, p); - if(d.isptr) - d.nofn = true; - CheckKey(')'); - } -// if(lex == tk_operator) -// d.name = ReadOper(); -// else - if(lex.IsId() || lex == t_dblcolon || lex == tk_operator) { - d.name = Name(); - if(Key(':')) - if(!Key(t_integer)) - Name(); - } - if(Key('(')) { - if((lex < 256 || lex == tk_true || lex == tk_false) - && lex != ')' && lex != t_dblcolon) { - int level = 0; - for(;;) { - if(lex == t_eof) break; - if(Key('(')) level++; - else - if(Key(')')) { - if(--level < 0) break; - } - else - ++lex; - } - return; - } - else { - d.function = !d.nofn; - ParamList(d); - p = lex.Pos(); - Qualifier(); - } - } - EatInitializers(); - while(Key('[')) { - const char *p = lex.Pos(); - int level = 1; - while(level && lex != t_eof) { - if(Key('[')) level++; - else - if(Key(']')) level--; - else - ++lex; - } - } - if(Key('=') || (inbody && lex == '(')) { - int lvl = 0; - for(;;) { - if(lex == t_eof || lvl == 0 && (lex == ',' || lex == ')' || lex == ';')) - break; - if(Key('(')) - lvl++; - else - if(Key(')')) - lvl--; - else - ++lex; - } - } -} - -Parser::Decl& Parser::Finish(Decl& d, const char *s) -{ - d.natural = String(s, lex.Pos()); - return d; -} - -Parser::Decl Parser::Type() { - Decl d; - const char *p = lex.Pos(); - Qualifier(); - SimpleType(d); - Declarator(d, p); - return Finish(d, p); -} - -Array Parser::Declaration(bool l0, bool more) -{ - Array r; - Decla d; - const char *p = lex.Pos(); - if(Key(tk_typedef)) { - r = Declaration(false, true); - for(int i = 0; i < r.GetCount(); i++) { - r[i].type_def = true; - r[i].natural = "typedef " + r[i].natural; - } - return r; - } - if(Key(tk_friend)) - d.isfriend = true; - for(;;) { - if(Key(tk_static)) - d.s_static = true; - else - if(Key(tk_extern)) - d.s_extern = true; - else - if(Key(tk_auto)) - d.s_auto = true; - else - if(Key(tk_register)) - d.s_register = true; - else - if(Key(tk_mutable)) - d.s_mutable = true; - else - if(Key(tk_explicit)) - d.s_explicit = true; - else - if(Key(tk_virtual)) - d.s_virtual = true; - else - if(!Key(tk_inline)) - break; - } - Qualifier(); - bool isdestructor = Key('~'); - if(l0 && context.typenames.Find(lex) >= 0 && lex[1] == '(' && lex.IsId()) { - Decl& a = r.Add(); - a.name = lex.GetId(); - a.isdestructor = isdestructor; - a.function = true; - a.istructor = true; - ++lex; - ParamList(a); - const char *p1 = lex.Pos(); - Qualifier(); - a.natural = String(p, lex.Pos()); - EatInitializers(); - return r; - } - if(lex == tk_operator) { - Decl& a = r.Add(); - (Decla&)a = d; - a.name = ReadOper(); - Key('('); - ParamList(a); - const char *p1 = lex.Pos(); - Qualifier(); - a.function = true; - a.natural = String(p, lex.Pos()); - return r; - } - String st = SimpleType(d); - if(!st.IsEmpty()) { - Decl& a = r.Add(); - a.name = st; - a.isdestructor = st.Find('~') > 0; - a.function = true; - a.istructor = true; - if(Key('(')) - ParamList(a); - const char *p1 = lex.Pos(); - Qualifier(); - a.natural = String(p, lex.Pos()); - EatInitializers(); - return r; - } - String natural1 = String(p, lex.Pos()); - do { - const char *p1 = lex.Pos(); - Decl& a = r.Add(); - (Decla&)a = d; - Declarator(a, p); - a.natural = natural1 + String(p1, lex.Pos()); - p = lex.Pos(); - } - while(more && Key(',')); - return r; -} - -void Parser::Locals(const String& type) -{ - Array d = Declaration(true, true); - for(int i = 0; i < d.GetCount(); i++) - local.Add(d[i].name, type); -} - -String Parser::Tparam(int& q) -{ - if(lex[q] != '<') - return Null; - const char *p = lex.Pos(q); - int level = 1; - q++; - while(lex[q] != t_eof && level) { - if(lex[q] == '<') - level++; - if(lex[q] == '>') - level--; - q++; - } - return String(p, lex.Pos(q)); -} - -String NoTemplatePars(const String& s) -{ - int q = s.Find('<'); - return q >= 0 ? s.Mid(0, q) : s; -} - -bool Parser::TryDecl() -{ - int q = 0; - while(lex[0] == tk_static || lex[0] == tk_const || lex[0] == tk_auto || - lex[0] == tk_register || lex[0] == tk_volatile) - ++lex; - int t = lex[q]; - if(t == tk_int || t == tk_bool || t == tk_float || t == tk_double || t == tk_void || - t == tk_long || t == tk_signed || t == tk_unsigned || t == tk_short || - t == tk_char || t == tk___int8 || t == tk___int16 || t == tk___int32 || t == tk___int64) { - while(lex[q] == '*' || lex[q] == '&') - q++; - if(!lex.IsId(q)) - return false; - Locals(Null); - return true; - } - String type; - if(lex[q] == t_dblcolon) { - type << "::"; - q++; - } - if(lex.IsId(q)) { - type << lex.Id(q++); - type << Tparam(q); - } - else - return false; - while(lex[q] == t_dblcolon) { - type << "::"; - if(lex.IsId(++q)) - type << lex.Id(q++); - else - return false; - type << Tparam(q); - } - while(lex[q] == '*' || lex[q] == '&') - q++; - if(!lex.IsId(q)) - return false; - type = Qualify(*base, current_nest, type); - if(base->Find(NoTemplatePars(type)) >= 0) { - Locals(type); - return true; - } - return false; -} - -void Parser::MatchPars() -{ - int level = 1; - while(level && lex != t_eof) { - if(Key('(')) level++; - else - if(Key(')')) level--; - else - ++lex; - } -} - -void Parser::Statement() -{ - RecursionCounter recursionCounter(currentScopeDepth, lex == '{' ? 0 : 1); - maxScopeDepth = max(maxScopeDepth, currentScopeDepth); - - if(Key(tk_case)) { - if(lex.IsId()) - ++lex; - Key(':'); - } - if(Key(tk_default)) - Key(':'); - if(lex.IsId() && lex[1] == ':') { - ++lex; - ++lex; - } - if(Key('{')) { - int l = local.GetCount(); - while(!Key('}')) { - if(lex == t_eof) - ThrowError(""); - Statement(); - } - local.Trim(l); - } - else - if(Key(tk_if)) { - int l = local.GetCount(); - Key('('); - TryDecl(); - MatchPars(); - Statement(); - if(Key(tk_else)) - Statement(); - local.Trim(l); - } - else - if(Key(tk_for)) { - int l = local.GetCount(); - Key('('); - TryDecl(); - MatchPars(); - Statement(); - local.Trim(l); - } - else - if(Key(tk_while)) { - int l = local.GetCount(); - Key('('); - TryDecl(); - MatchPars(); - Statement(); - local.Trim(l); - } - else - if(Key(tk_try)) - Statement(); - else - if(Key(tk_catch)) { - Key('('); - MatchPars(); - Statement(); - } - else - if(Key(tk_do)) { - Statement(); - Key(tk_while); - Key('('); - MatchPars(); - } - else - if(Key(tk_switch)) { - int l = local.GetCount(); - Key('('); - TryDecl(); - MatchPars(); - Statement(); - local.Trim(l); - } - else - if(TryDecl()) - Key(';'); - else - for(;;) { - if(lex == t_eof) - ThrowError(""); - if(Key(';') || lex == '{' || lex == '}' || lex >= tk_if && lex <= tk_do) - break; - ++lex; - } -} - -bool Parser::EatBody() -{ - if(lex != '{') return false; - maxScopeDepth = currentScopeDepth = dobody ? 0 : 1; - if(dobody) { - inbody = true; - Statement(); - inbody = false; - local.Clear(); - } - else { - Key('{'); - int level = 1; - while(level && lex != t_eof) { - if(Key('{')) level++; - else - if(Key('}')) level--; - else - ++lex; - maxScopeDepth = max(level, maxScopeDepth); - } - } - return true; -} - -String CleanTp(const String& tp) -{ - int q = tp.Find('<'); - int w = tp.ReverseFind('>'); - if(q < 0 || w < 0) return tp; - String a = TrimLeft(TrimRight(tp.Mid(q + 1, w - q - 1))); - const char *s = a; - String r; - while(*s) { - if(*s == ',') { - r.Cat(';'); - s++; - while(*s && *s <= ' ') - s++; - } - else - r.Cat(*s++); - } - return r; -} - -void Parser::SetNestCurrent() -{ - current_nest = Nvl(context.nesting, "::"); -} - -CppItem& Parser::Item(const String& nesting, const String& item, const String& name, bool impl) -{ - current_nest = Nvl(nesting, "::"); - if(dobody) - current = CppItem(); - current_key = item; - CppNest& n = base->GetAdd(current_nest); - n.namespacel = current_namespacel = context.namespacel; - CppItem& im = dobody ? current : n.GetAdd(item, name); - im.key = item; - CppPos& p = im.pos.Add(); - p.file = filei; - p.line = line + 1; - p.impl = impl; - return im; -} - -CppItem& Parser::Item(const String& nesting, const String& item, const String& name) -{ - String h = Purify(item); - CppItem& im = Item(nesting, h, name, false); - im.natural = h; - return im; -} - -void Parser::Resume(int bl) -{ - for(;;) { - if(lex == t_eof || lex.GetBracesLevel() == bl && lex == ';') - break; - ++lex; - } -} - -void Parser::NestBody() -{ - int bl = lex.GetBracesLevel(); - while(!Key('}')) { - if(lex == t_eof) - ThrowError("Unexpected end of file"); - try { - Do(); - } - catch(Error) { - Resume(bl); - Key(';'); - } - } -} - -void TpSkip(CParser& p) -{ - int lvl = 0; - for(;;) { - if(lvl == 0 && (p.IsChar(',') || p.IsChar('>')) || p.IsEof()) - break; - if(p.Char('<')) - lvl++; - else - if(p.Char('>')) - lvl--; - else - p.SkipTerm(); - } -} - -String Subst(const String& s, const Vector& tpar) -{ - if(tpar.GetCount() == 0) - return s; - String r; - CParser p(s); - while(!p.IsEof()) { - if(p.IsId()) { - String id = p.ReadId(); - int q = FindIndex(tpar, id); - if(q >= 0) - r << AsString(q); - else - r << id; - } - else - r << p.GetChar(); - } - return r; -} - -bool Parser::Nest(const String& tp, const String& tn) { - if(Key(tk_namespace)) { - Check(lex.IsId(), "Expected name of namespace"); - String name = lex.GetId(); - if(Key('{')) { - Context cc; - cc <<= context; - context.nesting << "::" << name; - context.namespacel = context.nesting.GetLength(); - NestBody(); - context <<= cc; - } - Key(';'); - SetNestCurrent(); - return true; - } - if((lex == tk_class || lex == tk_struct || lex == tk_union) && lex[1] != '{') { - int t = lex.GetCode(); - context.typenames.FindAdd(lex); - Context cc; - cc <<= context; - CParser p(tp); - Vector tpar; - if(p.Char('<')) { - while(!p.IsEof() && !p.Char('>')) { - if((p.Id("class") || p.Id("typename") || p.Id("struct")) && p.IsId()) { - tpar.Add(p.ReadId()); - context.tparam.Add(lex.Id(tpar.Top())); - } - else - context.tparam.Add(0); - TpSkip(p); - p.Char(','); - } - } - if(Key(t_dblcolon)) - context.nesting = Null; - String name; - do { - Check(lex.IsId(), "Missing identifier"); - context.typenames.FindAdd(lex); - name = lex.GetId(); - context.nesting << "::" << name; - } - while(Key(t_dblcolon)); - context.access = t == tk_class ? PRIVATE : PUBLIC; - context.noclass = false; - String nn; - if(!tp.IsEmpty()) - nn = "template " + tp + " "; - String key = (t == tk_class ? "class" : t == tk_union ? "union" : "struct"); - nn << key << ' ' << name; - CppItem& im = Item(context.nesting, key, name, lex != ';'); - if(Key(';')) { - context = cc; - SetNestCurrent(); - return true; - } - im.kind = tp.IsEmpty() ? STRUCT : STRUCTTEMPLATE; - im.type = name; - im.access = cc.access; - im.tname = tn; - im.tparam = CleanTp(tp); - im.ptype.Clear(); - im.pname.Clear(); - im.param.Clear(); - if(Key(':')) { - nn << " : "; - bool c = false; - do { - String access = t == tk_class ? "private" : "public"; - if(Key(tk_public)) access = "public"; - else - if(Key(tk_protected)) access = "protected"; - else - if(Key(tk_private)) access = "private"; - if(Key(tk_virtual)) access << " virtual"; - String h; - String n = Name(h); - ScAdd(im.pname, h); - if(c) - im.ptype << ';'; - im.ptype << Subst(n, tpar); - ScAdd(im.param, access + ' ' + n); - if(c) - nn << ", "; - nn << access + ' ' + n; - c = true; - } - while(Key(',')); - } - if(Key('{')) { - NestBody(); - im.natural = nn; - im.decla = true; - } - else - if(IsNull(im.natural)) - im.natural = nn; - context = cc; - CheckKey(';'); - SetNestCurrent(); - return true; - } - return false; -} - -String DeTemp(const char *s) -{ - String r; - int l = 0; - return r; -} - -CppItem& Parser::Fn(const Decl& d, const String& templ, bool body, int kind) -{ - String param; - String pname; - String ptype; - for(int i = 0; i < d.param.GetCount(); i++) { - const Decla& p = d.param[i]; - ScAdd(param, p.natural); - if(i) - ptype << ';'; - ptype << p.type; - ScAdd(pname, p.name); - } - String nn0; - String nm = d.name; - int q = d.name.ReverseFind(':'); - if(q >= 0) { - nm = d.name.Mid(q + 1); - if(q > 0) - nn0 = d.name.Mid(0, q - 1); - } - String item = FnItem(d.natural, pname, d.name, nm); - String nesting = context.nesting; - String nn; - const char *s = nn0; - int l = 0; - while(*s) { - if(*s == '<') - l++; - else - if(*s == '>') - l--; - else - if(l == 0) - nn.Cat(*s); - s++; - } - if(*nn == ':') - nesting = nn; - else - if(!IsNull(nn)) - nesting << "::" << nn; - CppItem& im = Item(nesting, item, nm, body); - if(!body || IsNull(im.natural)) { - im.natural.Clear(); - if(!IsNull(templ)) { - im.natural = templ; - im.at = im.natural.GetLength(); - } - im.natural << Purify(d.natural, d.name, nm); - im.kind = kind; - im.param = param; - im.pname = pname; - im.ptype = ptype; - im.access = context.access; - im.virt = d.s_virtual; - im.type = d.type; - im.decla = true; - } - return im; -} - -void Parser::Do() -{ - Line(); - if(Key(tk_using)) { - while(!Key(';') && lex != t_eof) - ++lex; - } - else - if(Key(tk_extern) && lex == t_string) { - ++lex; - ++lex; - if(Key('{')) { - int bl = lex.GetBracesLevel(); - while(lex != '}') - try { - if(lex == t_eof) - ThrowError("Unexpected end of file"); - Do(); - } - catch(Error) { - Resume(bl); - } - } - Key(';'); - } - else - if(Key(tk_template)) { - if(lex.IsId() || lex == tk_class && lex.IsId(1)) { - Key(tk_class); - for(;;) { - if(lex.IsId()) - lex.GetId(); - else - if(!Key(t_dblcolon)) - break; - } - TemplateParams(); - Key(';'); - } - else { - String tnames; - String tparam = TemplateParams(tnames); - if(!Nest(tparam, tnames)) { - Array r = Declaration(true, true); - CppItem *functionItem = 0; - bool body = lex == '{'; - for(int i = 0; i < r.GetCount(); i++) { - Decl& d = r[i]; - if(!d.isfriend && d.function) { - CppItem& m = Fn(d, "template " + tparam + ' ', body, - context.noclass ? FUNCTIONTEMPLATE : - d.s_static ? CLASSFUNCTIONTEMPLATE : - INSTANCEFUNCTIONTEMPLATE); - m.tname = tnames; - m.tparam = CleanTp(tparam); - functionItem = &m; - } - } - if(body && functionItem && whenFnEnd) { - symbolsOutsideFunctions.Merge( lex.FinishStatCollection() ); - lex.StartStatCollection(); // start collection of function symbols - } - EatBody(); - if(body && functionItem && whenFnEnd) { - whenFnEnd(FunctionStat(current_nest, *functionItem, - lex.FinishStatCollection(), maxScopeDepth)); - lex.StartStatCollection(); // start collection of orphan symbols - } - Key(';'); - } - EatBody(); - } - } - else - if(lex == tk_enum && (lex[1] == '{' || lex[2] == '{')) { - ++lex; - String name; - if(lex.IsId()) - name = lex.GetId(); - if(Key('{')) { - for(;;) { - Line(); - String val; - Check(lex.IsId(), "Expected identifier"); - String id = lex.GetId(); - CppItem& im = Item(context.nesting, id, id); - im.natural = "enum "; - if(!IsNull(name)) - im.natural << name << ' '; - im.natural << id; - if(Key('=')) - im.natural << " = " << Constant(); - im.kind = ENUM; - im.access = context.access; - Key(','); - if(Key('}')) break; - } - } - Key(';'); - SetNestCurrent(); - } - else - if(Key('#')) { - if(lex.Code() == t_string) { - String n = lex.GetText(); - String name; - const char *s = n; - while(*s && iscid(*s)) - name.Cat(*s++); - CppItem& im = Item(context.nesting, n, name); - im.kind = MACRO; - s = strchr(n, '('); - if(s) { - s++; - String p; - for(;;) { - if(iscid(*s)) - p.Cat(*s++); - else { - ScAdd(im.pname, p); - p.Clear(); - if(*s == ')' || *s == '\0') break; - s++; - } - } - } - im.access = context.access; - } - } - else - if(!Nest(String(), String())) { - if(Key(tk_public)) { - context.access = PUBLIC; - Key(':'); - } - else - if(Key(tk_private)) { - context.access = PRIVATE; - Key(':'); - } - else - if(Key(tk_protected)) { - context.access = PROTECTED; - Key(':'); - } - else { - Array r = Declaration(true, true); - CppItem *functionItem = 0; - bool body = lex == '{'; - for(int i = 0; i < r.GetCount(); i++) { - Decl& d = r[i]; - if(!d.isfriend || body) { - if(d.function) { - CppItem &im = - Fn(d, Null, body, d.istructor ? (d.isdestructor ? DESTRUCTOR : CONSTRUCTOR) : - d.isfriend ? INLINEFRIEND : - context.noclass ? FUNCTION : - d.s_static ? CLASSFUNCTION : INSTANCEFUNCTION); - functionItem = &im; - } - else { - String h = d.natural; - int q = h.Find('='); - if(q >= 0) - h = TrimRight(h.Mid(0, q)); - String nest = context.nesting; - if(d.type_def) - nest << "::" << d.name; - CppItem& im = Item(nest, d.type_def ? "typedef" : d.name, d.name); - im.natural = Purify(h); - im.type = im.ptype = d.type; - im.access = context.access; - im.kind = d.type_def ? TYPEDEF : - context.noclass ? VARIABLE : - d.s_static ? CLASSVARIABLE : INSTANCEVARIABLE; - } - } - } - if(body && functionItem && whenFnEnd) { - symbolsOutsideFunctions.Merge( lex.FinishStatCollection() ); - lex.StartStatCollection(); // start collection of function symbols - } - EatBody(); - if(body && functionItem && whenFnEnd) { - whenFnEnd(FunctionStat(current_nest, *functionItem, - lex.FinishStatCollection(), maxScopeDepth)); - lex.StartStatCollection(); // start collection of orphan symbols - } - SetNestCurrent(); - Key(';'); - } - } -} - -void Parser::Do(Stream& in, const Vector& ignore, CppBase& _base, const String& fn, - Callback2 _err, const Vector& typenames) -{ - base = &_base; - file = PreProcess(in); - lex.Init(~file.text, ignore); - err = _err; - context.access = PUBLIC; - context.noclass = true; - context.typenames.Clear(); - for(int i = 0; i < typenames.GetCount(); i++) - context.typenames.Add(lex.Id(typenames[i])); - context.namespacel = 0; - inbody = false; - filei = GetCppFileIndex(fn); - lpos = 0; - line = 0; - if(whenFnEnd) - lex.StartStatCollection(); - - while(lex != t_eof) - try { - Do(); - } - catch(Error) { - Resume(0); - Key(';'); - } -} - -void Parse(Stream& s, const Vector& ignore, CppBase& base, const String& fn, - Callback2 _err) -{ - LTIMING("Parse"); - Parser p; - p.Do(s, ignore, base, fn, _err); -} diff --git a/uppbox/CppBase2/Pre.cpp b/uppbox/CppBase2/Pre.cpp deleted file mode 100644 index f98c90caa..000000000 --- a/uppbox/CppBase2/Pre.cpp +++ /dev/null @@ -1,176 +0,0 @@ -#include "CppBase.h" - -#ifdef _MSC_VER -#pragma inline_depth(255) -#pragma optimize("t", on) -#endif - -static Index cpp_file; - -int GetCppFileIndex(const String& path) -{ - return cpp_file.FindAdd(path); -} - -const String& GetCppFile(int i) -{ - return cpp_file[i]; -} -/* -void CppPos::Serialize(Stream& s) -{ - s % impl % line; - String fn = GetCppFile(file); - s % fn; - file = GetCppFileIndex(fn); -} - -String SSpaces(const char *txt) -{ - StringBuffer r; - while(*txt) - if(*txt == ' ') { - while((byte)*txt <= ' ' && *txt) txt++; - r.Cat(' '); - } - else - r.Cat(*txt++); - return r; -} -*/ -void SLPos(SrcFile& res) -{ - res.linepos.Add(res.text.GetLength()); -} - -SrcFile::SrcFile() : - preprocessorLinesRemoved(0), - blankLinesRemoved(0), - commentLinesRemoved(0) -{ -} - -SrcFile PreProcess(Stream& in) -{ - SrcFile res; - bool include = true; - while(!in.IsEof()) { - String ln = in.GetLine(); - SLPos(res); - while(*ln.Last() == '\\') { - ln.Trim(ln.GetLength() - 1); - ln.Cat(in.GetLine()); - SLPos(res); - } - const char *rm = ln; - while(*rm == ' ' || *rm == '\t') rm++; - if(*rm == '\0') - res.blankLinesRemoved++; - else - if(*rm == '#') - { - if(rm[1] == 'd' && rm[2] == 'e' && rm[3] == 'f' && - rm[4] == 'i' && rm[5] == 'n' && rm[6] == 'e' && !iscid(rm[7])) { - const char *s = rm + 8; - while(*s == ' ') s++; - String macro; - while(iscid(*s)) - macro.Cat(*s++); - if(*s == '(') { - while(*s != ')' && *s) - macro.Cat(*s++); - macro << ')'; - } -// res.text << '#' << AsCString(SSpaces(macro)); - res.text << '#' << AsCString(macro); - } - res.preprocessorLinesRemoved++; - } - else { - bool lineContainsComment = false; - bool lineContainsNonComment = false; - String cmd; - while(*rm) { - if(*rm == '\"') { - lineContainsNonComment = true; - res.text << '\"'; - rm++; - while((byte)*rm && *rm != '\r' && *rm != '\n') { - if(*rm == '\"') { - res.text << '\"'; - rm++; - break; - } - if(*rm == '\\' && rm[1]) { - if(include) - res.text.Cat(*rm); - rm++; - } - if(include) - res.text.Cat(*rm); - rm++; - } - } - else - if(*rm == '\\' && rm[1]) { - lineContainsNonComment = true; - if(include) { - res.text.Cat(*rm++); - res.text.Cat(*rm++); - } - else - rm += 2; - } - else - if(rm[0] == '/' && rm[1] == '/') { - cmd = rm + 2; - if(!lineContainsNonComment) - res.commentLinesRemoved++; - break; - } - else - if(rm[0] == '/' && rm[1] == '*') { - lineContainsComment = true; - rm += 2; - for(;;) { - if(*rm == '\0') { - if(!lineContainsNonComment) - res.commentLinesRemoved++; - if(in.IsEof()) break; - SLPos(res); - ln = in.GetLine(); - rm = ~ln; - lineContainsNonComment = false; - } - if(rm[0] == '*' && rm[1] == '/') { - rm += 2; - break; - } - rm++; - } - if(include) - res.text.Cat(' '); - } - else { - lineContainsNonComment = true; - if(include) - res.text.Cat(*rm); - rm++; - } - } - if(include) - res.text << ' '; - if(cmd[0] == '$') { - if(cmd[1] == '-') include = false; - if(cmd[1] == '+') include = true; - if(cmd[1]) { - res.text.Cat(~cmd + 2); - res.text.Cat(' '); - } - } - if(lineContainsComment && !lineContainsNonComment) - res.commentLinesRemoved++; - } - } - return res; -} diff --git a/uppbox/CppBase2/cpplex.cpp b/uppbox/CppBase2/cpplex.cpp deleted file mode 100644 index ff4d92d05..000000000 --- a/uppbox/CppBase2/cpplex.cpp +++ /dev/null @@ -1,421 +0,0 @@ -#include "CppBase.h" - -#ifdef _MSC_VER -#pragma inline_depth(255) -#pragma optimize("t", on) -#endif - - -#define case_id \ - case '_':case 'a':case 'b':case 'c':case 'd':case 'e':case 'f':case 'g':case 'h': \ - case 'i':case 'j':case 'k':case 'l':case 'm':case 'n':case 'o':case 'p':case 'q': \ - case 'r':case 's':case 't':case 'u':case 'v':case 'w':case 'x':case 'y':case 'z': \ - case 'A':case 'B':case 'C':case 'D':case 'E':case 'F':case 'G':case 'H':case 'I': \ - case 'J':case 'K':case 'L':case 'M':case 'N':case 'O':case 'P':case 'Q':case 'R': \ - case 'S':case 'T':case 'U':case 'V':case 'W':case 'X':case 'Y':case 'Z' - -#define case_nonzero_digit \ - case '1':case '2':case '3':case '4':case '5':case '6':case '7':case '8':case '9' - - -const char *_CppKeyword[] = { -#define CPPID(x) #x, -#include "keyword.i" -#undef CPPID - NULL -}; - -const char **CppKeyword() { return _CppKeyword; } - - -LexSymbolStat::LexSymbolStat() : - minSymbol(0) -{ -} - -void LexSymbolStat::Reset(int minSymbol, int maxSymbol) -{ - ASSERT(minSymbol <= maxSymbol); - v.Clear(); - this->minSymbol = minSymbol; - v.SetCount(maxSymbol - minSymbol + 1, 0); -} - -void LexSymbolStat::IncStat(int symbol) -{ - int symbolIndex = symbol - minSymbol; - if(symbolIndex >= 0 && symbolIndex < v.GetCount()) - v[symbolIndex]++; -} - -int LexSymbolStat::GetStat(int symbol) const -{ - int symbolIndex = symbol - minSymbol; - return (symbolIndex >= 0 && symbolIndex < v.GetCount()) ? - v[symbolIndex] : - 0; -} - -int LexSymbolStat::SumStat(const Vector & symbols) const -{ - int sum = 0; - for(int i = 0; i < symbols.GetCount(); i++) - sum += GetStat(symbols[i]); - return sum; -} - -void LexSymbolStat::Merge(const LexSymbolStat & other) -{ - if(v.GetCount() == 0) { - minSymbol = other.minSymbol; - v <<= other.v; - return; - } - ASSERT(other.minSymbol == minSymbol && other.v.GetCount() == v.GetCount()); - for(int i = 0; i < v.GetCount(); i++) - v[i] += other.v[i]; -} - - -Lex::Lex() : - statsCollected(false) -{ - const char **cppk = CppKeyword(); - for(int i = 0; cppk[i]; i++) - id.Add(cppk[i]); - endkey = id.GetCount(); - braceslevel = ignore_low = ignore_high = 0; -} - -void Lex::Init(const char *s, const Vector& ig) -{ - ptr = s; - ignore_low = id.GetCount(); - for(int i = 0; i < ig.GetCount(); i++) - id.Add(ig[i]); - ignore_high = id.GetCount(); -} - -void Lex::StartStatCollection() -{ - symbolStat.Reset(-200, endkey+256); - statsCollected = true; -} - -const LexSymbolStat & Lex::FinishStatCollection() -{ - statsCollected = false; - return symbolStat; -} - - -int Lex::GetCharacter() -{ - if(*ptr == '\0') return t_eof; - int c = *ptr++; - if(c == '\\') { - c = *ptr++; - switch(c) { - case 'a': return '\a'; - case 'b': return '\b'; - case 't': return '\t'; - case 'v': return '\v'; - case 'n': return '\n'; - case 'r': return '\r'; - case 'f': return '\f'; - case 'x': - c = 0; - if(isxdigit(*ptr)) { - c = (*ptr >= 'A' ? ToUpper(*ptr) - 'A' + 10 : *ptr - '0'); - ptr++; - if(isxdigit(*ptr)) { - c = 16 * c + (*ptr >= 'A' ? ToUpper(*ptr) - 'A' + 10 : *ptr - '0'); - ptr++; - } - } - break; - default: - if(c >= '0' && c <= '7') { - c -= '0'; - if(*ptr >= '0' && *ptr <= '7') - c = 8 * c + *ptr++ - '0'; - if(*ptr >= '0' && *ptr <= '7') - c = 8 * c + *ptr++ - '0'; - } - } - } - return (byte)c; -} - -#pragma optimize("t", on) - -void Lex::Next() -{ - while((byte)*ptr <= ' ') { - if(*ptr == '\0') return; - ptr++; - } - pos = ptr; - int c = (byte)*ptr++; - if(c == '\0') return; - switch(c) { - case_id: { - String x; - x.Reserve(12); - x.Cat(c); - while(iscid(*ptr)) - x.Cat(*ptr++); - int q = id.FindAdd(x); - if(q >= ignore_low && q < ignore_high) - while((byte)*ptr <= ' ') { - ptr++; - if(*ptr == '(') { - int level = 1; - while(*ptr && level) { - if(*ptr == '(') - level++; - if(*ptr == ')') - level--; - ptr++; - } - } - } - else - AddCode(q + 256); - break; - } - case ':': AddCode(Char(':') ? t_dblcolon : ':'); break; - case '*': AssOp('*', t_mulass); break; - case '/': AssOp('/', t_divass); break; - case '%': AssOp('%', t_modass); break; - case '^': AssOp('^', t_xorass); break; - case '!': AssOp('!', t_neq); break; - case '.': - if(Char('*')) AddCode(t_dot_asteriks); - else - if(*ptr == '.' && ptr[1] == '.') { - AddCode(t_elipsis); - ptr += 2; - } - else - AddCode('.'); - break; - case '+': - if(Char('+')) AddCode(t_inc); - else - AssOp('+', t_addass); - return; - case '-': - if(Char('-')) AddCode(t_dec); - else - if(Char('>')) - AddCode(Char('*') ? t_arrow_asteriks : t_arrow); - else - AssOp('-', t_subass); - break; - case '&': - if(Char('&')) - AddCode(t_and); - else - AssOp('&', t_andass); - break; - case '|': - if(Char('|')) - AddCode(t_or); - else - AssOp('|', t_orass); - break; - case '=': - AssOp('=', t_eq); - break; - case '<': - if(Char('<')) - AssOp(t_shl, t_shlass); - else - AssOp('<', t_le); - break; - case '>': - if(Char('>')) - AssOp(t_shr, t_shrass); - else - AssOp('>', t_ge); - break; - case '0': { - dword w = 0; - if(Char('x') || Char('X')) { - for(;;) { - int d; - if(*ptr >= '0' && *ptr <= '9') - d = *ptr - '0'; - else - if(*ptr >= 'A' && *ptr <= 'F') - d = *ptr - 'A' + 10; - else - if(*ptr >= 'a' && *ptr <= 'f') - d = *ptr - 'a' + 10; - else - break; - if(w >= 0x8000000u - d) { - AddCode(te_integeroverflow); - return; - } - w = w * 16 + d - '0'; - ptr++; - } - } - else - while(*ptr >= '0' && *ptr <= '7') { - int d = *ptr++ - '0'; - if(w >= 0x1000000u - d) { - AddCode(te_integeroverflow); - return; - } - w = w * 8 + d - '0'; - } - Term& tm = term.AddTail(); - tm.code = t_integer; - tm.ptr = pos; - tm.number = w; - } - break; - case_nonzero_digit: { - double w = c - '0'; - bool fp = false; - while(*ptr >= '0' && *ptr <= '9') - w = w * 10 + *ptr++ - '0'; - if(*ptr == '.') { // TO BE Completed !!! - fp = true; - ptr++; - double x = 0.1; - while(*ptr >= '0' && *ptr <= '9') { - w += x * (*ptr++ - '0'); - x /= 10; - } - } - Term& tm = term.AddTail(); - if(fp || w < INT_MIN || w > INT_MAX) - tm.code = t_double; - else - tm.code = t_integer; - tm.ptr = pos; - tm.number = w; - } - break; - case '\'': { - Term& tm = term.AddTail(); - tm.code = t_character; - tm.ptr = pos; - tm.text = String(GetCharacter(), 1); - if(*ptr == '\'') - ptr++; - else - tm.code = te_badcharacter; - } - break; - case '\"': { - Term& tm = term.AddTail(); - tm.code = t_string; - tm.ptr = pos; - for(;;) { - while(*ptr != '\"') { - if((byte)*ptr < ' ') { - tm.code = te_badstring; - return; - } - tm.text.Cat(GetCharacter()); - } - ptr++; - while(*ptr && (byte)*ptr <= ' ') ptr++; - if(*ptr != '\"') break; - ptr++; - } - } - break; - default: - AddCode(c); - return; - } -} - -#pragma optimize("t", off) - -bool Lex::Prepare(int pos) { - while(term.GetCount() <= pos) { - if(*ptr == '\0') return false; - Next(); - } -#ifdef _DEBUG - pp = term[0].ptr; -#endif - return true; -} - -int Lex::Code(int pos) -{ - if(!Prepare(pos)) return t_eof; - return term[pos].code; -} - -bool Lex::IsId(int pos) -{ - return Code(pos) >= endkey + 256; -} - -String Lex::Id(int pos) -{ - ASSERT(IsId(pos)); - return id[Code(pos) - 256]; -} - -void Lex::Get(int n) -{ - while(n--) { - if(term.GetCount()) { - int chr = term.Head().code; - if(statsCollected) - symbolStat.IncStat(chr); - if(chr == '{') - braceslevel++; - else - if(chr == '}') - braceslevel--; - term.DropHead(); - } - if(term.GetCount() == 0) - Next(); - } -} - -int Lex::Int(int pos) -{ - Prepare(pos); - ASSERT(term[pos].code == t_integer); - return (int)term[pos].number; -} - -double Lex::Double(int pos) -{ - Prepare(pos); - ASSERT(term[pos].code == t_double); - return term[pos].number; -} - -String Lex::Text(int pos) -{ - Prepare(pos); - ASSERT(term[pos].code == t_string); - return term[pos].text; -} - -int Lex::Chr(int pos) -{ - Prepare(pos); - ASSERT(term[pos].code == t_character); - return (byte)*term[pos].text; -} - -const char *Lex::Pos(int pos) -{ - Prepare(pos); - return pos < term.GetCount() ? term[pos].ptr : ptr; -} diff --git a/uppbox/CppBase2/keyword.i b/uppbox/CppBase2/keyword.i deleted file mode 100644 index 1ac50be45..000000000 --- a/uppbox/CppBase2/keyword.i +++ /dev/null @@ -1,81 +0,0 @@ -#pragma BLITZ_APPROVE - -CPPID(__asm) -CPPID(else) -CPPID(struct) -CPPID(enum) -CPPID(auto) -CPPID(__except) -CPPID(template) -CPPID(explicit) -CPPID(this) -CPPID(bool) -CPPID(extern) -CPPID(mutable) -CPPID(thread) -CPPID(break) -CPPID(false) -CPPID(throw) -CPPID(case) -//CPPID(__fastcall) -CPPID(namespace) -CPPID(true) -//CPPID(__finally) -CPPID(new) -//CPPID(__cdecl) -CPPID(float) -CPPID(__try) -CPPID(char) -CPPID(operator) -CPPID(typedef) -CPPID(class) -CPPID(friend) -CPPID(private) -CPPID(typeid) -CPPID(const) -CPPID(goto) -CPPID(protected) -CPPID(typename) -CPPID(const_cast) -CPPID(public) -CPPID(union) -CPPID(continue) -CPPID(inline) -CPPID(register) -CPPID(unsigned) -//CPPID(__declspec) -//CPPID(__inline) -CPPID(reinterpret_cast) -CPPID(using) -CPPID(default) -CPPID(int) -CPPID(return) -CPPID(delete) -CPPID(__int8) -CPPID(short) -CPPID(__uuidof) -CPPID(dllexport) -CPPID(__int16) -CPPID(signed) -CPPID(virtual) -CPPID(dllimport) -CPPID(__int32) -CPPID(sizeof) -CPPID(void) -CPPID(__int64) -CPPID(static) -CPPID(volatile) -CPPID(double) -CPPID(__leave) -CPPID(static_cast) -CPPID(dynamic_cast) -CPPID(long) -//CPPID(__stdcall) - -CPPID(if) -CPPID(while) -CPPID(switch) -CPPID(for) -CPPID(try) -CPPID(catch) -CPPID(do) diff --git a/uppbox/CppBase2/perf.txt b/uppbox/CppBase2/perf.txt deleted file mode 100644 index fb404e14d..000000000 --- a/uppbox/CppBase2/perf.txt +++ /dev/null @@ -1,9 +0,0 @@ -Qualify: - -base performance 2.25 s -better bases 2.05 s - -------------- -Optimized: -MSC71cdb 1.05s -MSC80cbd 1.32s (-O1, speeed optimization in file) diff --git a/uppbox/Uvs2/AUTHORS b/uppbox/Uvs2/AUTHORS deleted file mode 100644 index f52ff393f..000000000 --- a/uppbox/Uvs2/AUTHORS +++ /dev/null @@ -1,2 +0,0 @@ -Mirek Fidler -Tomas Rylek \ No newline at end of file diff --git a/uppbox/Uvs2/COPYING b/uppbox/Uvs2/COPYING deleted file mode 100644 index 306c7974b..000000000 --- a/uppbox/Uvs2/COPYING +++ /dev/null @@ -1,30 +0,0 @@ -Copyright (C) 2005 Mirek Fidler, Tomas Rylek and various contributors (see AUTHORS) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies of the Software and its Copyright notices. In addition publicly -documented acknowledgment must be given that this software has been used if no -source code of this software is made available publicly. This includes -acknowledgments in either Copyright notices, Manuals, Publicity and Marketing -documents or any documentation provided with any product containing this -software. This License does not apply to any software that links to the -libraries provided by this software (statically or dynamically), but only to -the software provided. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ------------ - -Please see the COPYING.PLAIN for a plain-english explanation of this notice -and it's intent. diff --git a/uppbox/Uvs2/COPYING-PLAIN b/uppbox/Uvs2/COPYING-PLAIN deleted file mode 100644 index 5b4491072..000000000 --- a/uppbox/Uvs2/COPYING-PLAIN +++ /dev/null @@ -1,33 +0,0 @@ -Plain English Copyright Notice - -This file is not intended to be the actual License. The reason this file -exists is that we here are programmers and engineers. We aren't lawyers. We -provide licenses that we THINK say the right things, but we have our own -intentions at heart. This is a plain-english explanation of what those -intentions are, and if you follow them you will be within the "spirit" of -the license. - -The intent is for us to enjoy writing software that is useful to us (the -AUTHORS) and allow others to use it freely and also benefit from the work we -put into making it. We don't want to restrict others using it. They should -not *HAVE* to make the source code of the applications they write that -simply link to these libraries (be that statically or dynamically), or for -them to be limited as to what license they choose to use (be it open, closed -or anything else). But we would like to know you are using these libraries. -We simply would like to know that it has been useful to someone. This is why -we ask for acknowledgement of some sort. - -You can do what you want with the source of this software - it doesn't -matter. We still have it here for ourselves and it is open and free to use -and download and play with. It can't be taken away. We don't really mind what -you do with the source to your software. We would simply like to know that -you are using it - especially if it makes it to a commerical product. If you -simply e-mail all the AUTHORS (see COPYING and AUTHORS files) telling us, and -then make sure you include a paragraph or page in the manual or in the "About.." -box for the product with the copyright notice and state that you used this -software, we will be very happy. If you want to contribute back modifications -and fixes you may have made we will welcome those too with open arms (generally). -If you want help with changes needed, ports needed or features to be added, -arrangements can be easily made with some dialogue. - -Mirek Fidler diff --git a/uppbox/Uvs2/DlgFiles.lay b/uppbox/Uvs2/DlgFiles.lay index 60d4fd681..731a94136 100644 --- a/uppbox/Uvs2/DlgFiles.lay +++ b/uppbox/Uvs2/DlgFiles.lay @@ -61,3 +61,4 @@ LAYOUT(FindChangeLayout, 246, 80) ITEM(Button, ok, SetLabel(t_("OK")).RightPosZ(90, 80).BottomPosZ(4, 22)) ITEM(Button, cancel, SetLabel(t_("Cancel")).RightPosZ(4, 80).BottomPosZ(4, 22)) END_LAYOUT + diff --git a/uppbox/Uvs2/Uvs2.upp b/uppbox/Uvs2/Uvs2.upp index 340636ad1..f04c9627c 100644 --- a/uppbox/Uvs2/Uvs2.upp +++ b/uppbox/Uvs2/Uvs2.upp @@ -23,11 +23,7 @@ file DlgFilesSetup.cpp, DlgFilesSetup.lay, DlgFiles.cpp, - DlgFiles.lay, - Info readonly separator, - COPYING, - COPYING-PLAIN, - AUTHORS; + DlgFiles.lay; mainconfig "" = "GUI", diff --git a/uppbox/Uvs2/init b/uppbox/Uvs2/init index 2a94089e4..3641712ce 100644 --- a/uppbox/Uvs2/init +++ b/uppbox/Uvs2/init @@ -5,5 +5,7 @@ #include "plugin\z/init" #include "plugin\ftp/init" #include "CtrlLib/init" +#define BLITZ_INDEX__ FBCE16A4E47C9D5FD092354066DF5ED0C #include "Uvs2_init.icpp" +#undef BLITZ_INDEX__ #endif diff --git a/uppbox/WinInstaller/AUTHORS b/uppbox/WinInstaller/AUTHORS deleted file mode 100644 index f52ff393f..000000000 --- a/uppbox/WinInstaller/AUTHORS +++ /dev/null @@ -1,2 +0,0 @@ -Mirek Fidler -Tomas Rylek \ No newline at end of file diff --git a/uppbox/WinInstaller/COPYING b/uppbox/WinInstaller/COPYING deleted file mode 100644 index 306c7974b..000000000 --- a/uppbox/WinInstaller/COPYING +++ /dev/null @@ -1,30 +0,0 @@ -Copyright (C) 2005 Mirek Fidler, Tomas Rylek and various contributors (see AUTHORS) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies of the Software and its Copyright notices. In addition publicly -documented acknowledgment must be given that this software has been used if no -source code of this software is made available publicly. This includes -acknowledgments in either Copyright notices, Manuals, Publicity and Marketing -documents or any documentation provided with any product containing this -software. This License does not apply to any software that links to the -libraries provided by this software (statically or dynamically), but only to -the software provided. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ------------ - -Please see the COPYING.PLAIN for a plain-english explanation of this notice -and it's intent. diff --git a/uppbox/WinInstaller/COPYING-PLAIN b/uppbox/WinInstaller/COPYING-PLAIN deleted file mode 100644 index 5b4491072..000000000 --- a/uppbox/WinInstaller/COPYING-PLAIN +++ /dev/null @@ -1,33 +0,0 @@ -Plain English Copyright Notice - -This file is not intended to be the actual License. The reason this file -exists is that we here are programmers and engineers. We aren't lawyers. We -provide licenses that we THINK say the right things, but we have our own -intentions at heart. This is a plain-english explanation of what those -intentions are, and if you follow them you will be within the "spirit" of -the license. - -The intent is for us to enjoy writing software that is useful to us (the -AUTHORS) and allow others to use it freely and also benefit from the work we -put into making it. We don't want to restrict others using it. They should -not *HAVE* to make the source code of the applications they write that -simply link to these libraries (be that statically or dynamically), or for -them to be limited as to what license they choose to use (be it open, closed -or anything else). But we would like to know you are using these libraries. -We simply would like to know that it has been useful to someone. This is why -we ask for acknowledgement of some sort. - -You can do what you want with the source of this software - it doesn't -matter. We still have it here for ourselves and it is open and free to use -and download and play with. It can't be taken away. We don't really mind what -you do with the source to your software. We would simply like to know that -you are using it - especially if it makes it to a commerical product. If you -simply e-mail all the AUTHORS (see COPYING and AUTHORS files) telling us, and -then make sure you include a paragraph or page in the manual or in the "About.." -box for the product with the copyright notice and state that you used this -software, we will be very happy. If you want to contribute back modifications -and fixes you may have made we will welcome those too with open arms (generally). -If you want help with changes needed, ports needed or features to be added, -arrangements can be easily made with some dialogue. - -Mirek Fidler diff --git a/uppbox/WinInstaller/WinInstaller.upp b/uppbox/WinInstaller/WinInstaller.upp index 92ae35872..7eee3d4c4 100644 --- a/uppbox/WinInstaller/WinInstaller.upp +++ b/uppbox/WinInstaller/WinInstaller.upp @@ -1,18 +1,16 @@ -uses - Core, - plugin\bz2; - -library "advapi32 comdlg32 comctl32 user32 gdi32"; - -file - Install.h, - Progress.cpp, - Install.cpp, - install.rc, - Info readonly separator, - COPYING, - COPYING-PLAIN, - AUTHORS; - -mainconfig - "" = "GUI"; +uses + Core, + plugin\bz2; + +library + "advapi32 comdlg32 comctl32 user32 gdi32"; + +file + Install.h, + Progress.cpp, + Install.cpp, + install.rc; + +mainconfig + "" = "GUI"; + diff --git a/uppbox/WinInstaller/init b/uppbox/WinInstaller/init new file mode 100644 index 000000000..7e0a08749 --- /dev/null +++ b/uppbox/WinInstaller/init @@ -0,0 +1,5 @@ +#ifndef _WinInstaller_icpp_init_stub +#define _WinInstaller_icpp_init_stub +#include "Core/init" +#include "plugin\bz2/init" +#endif diff --git a/uppbox/WinInstaller2/AUTHORS b/uppbox/WinInstaller2/AUTHORS deleted file mode 100644 index f52ff393f..000000000 --- a/uppbox/WinInstaller2/AUTHORS +++ /dev/null @@ -1,2 +0,0 @@ -Mirek Fidler -Tomas Rylek \ No newline at end of file diff --git a/uppbox/WinInstaller2/COPYING b/uppbox/WinInstaller2/COPYING deleted file mode 100644 index 306c7974b..000000000 --- a/uppbox/WinInstaller2/COPYING +++ /dev/null @@ -1,30 +0,0 @@ -Copyright (C) 2005 Mirek Fidler, Tomas Rylek and various contributors (see AUTHORS) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies of the Software and its Copyright notices. In addition publicly -documented acknowledgment must be given that this software has been used if no -source code of this software is made available publicly. This includes -acknowledgments in either Copyright notices, Manuals, Publicity and Marketing -documents or any documentation provided with any product containing this -software. This License does not apply to any software that links to the -libraries provided by this software (statically or dynamically), but only to -the software provided. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ------------ - -Please see the COPYING.PLAIN for a plain-english explanation of this notice -and it's intent. diff --git a/uppbox/WinInstaller2/COPYING-PLAIN b/uppbox/WinInstaller2/COPYING-PLAIN deleted file mode 100644 index 5b4491072..000000000 --- a/uppbox/WinInstaller2/COPYING-PLAIN +++ /dev/null @@ -1,33 +0,0 @@ -Plain English Copyright Notice - -This file is not intended to be the actual License. The reason this file -exists is that we here are programmers and engineers. We aren't lawyers. We -provide licenses that we THINK say the right things, but we have our own -intentions at heart. This is a plain-english explanation of what those -intentions are, and if you follow them you will be within the "spirit" of -the license. - -The intent is for us to enjoy writing software that is useful to us (the -AUTHORS) and allow others to use it freely and also benefit from the work we -put into making it. We don't want to restrict others using it. They should -not *HAVE* to make the source code of the applications they write that -simply link to these libraries (be that statically or dynamically), or for -them to be limited as to what license they choose to use (be it open, closed -or anything else). But we would like to know you are using these libraries. -We simply would like to know that it has been useful to someone. This is why -we ask for acknowledgement of some sort. - -You can do what you want with the source of this software - it doesn't -matter. We still have it here for ourselves and it is open and free to use -and download and play with. It can't be taken away. We don't really mind what -you do with the source to your software. We would simply like to know that -you are using it - especially if it makes it to a commerical product. If you -simply e-mail all the AUTHORS (see COPYING and AUTHORS files) telling us, and -then make sure you include a paragraph or page in the manual or in the "About.." -box for the product with the copyright notice and state that you used this -software, we will be very happy. If you want to contribute back modifications -and fixes you may have made we will welcome those too with open arms (generally). -If you want help with changes needed, ports needed or features to be added, -arrangements can be easily made with some dialogue. - -Mirek Fidler diff --git a/uppbox/WinInstaller2/WinInstaller2.upp b/uppbox/WinInstaller2/WinInstaller2.upp index ec389b832..06caa31a0 100644 --- a/uppbox/WinInstaller2/WinInstaller2.upp +++ b/uppbox/WinInstaller2/WinInstaller2.upp @@ -1,44 +1,41 @@ -uses - Core; - -library - "advapi32 comdlg32 comctl32 user32 gdi32"; - -file - Install.h, - Progress.cpp, - 7zMain.cpp, - Install.cpp, - data.rc, - install.rc, - LZMA readonly separator, - LzmaDecode.c, - LzmaDecode.h, - LzmaTest.c, - 7zAlloc.c, - 7zAlloc.h, - 7zBuffer.c, - 7zBuffer.h, - 7zCrc.c, - 7zCrc.h, - 7zDecode.c, - 7zDecode.h, - 7zExtract.c, - 7zExtract.h, - 7zHeader.c, - 7zHeader.h, - 7zIn.c, - 7zIn.h, - 7zItem.c, - 7zItem.h, - 7zMethodID.c, - 7zMethodID.h, - 7zTypes.h, - 7zC.txt, - Info readonly separator, - COPYING, - COPYING-PLAIN, - AUTHORS; - -mainconfig - "" = "GUI"; +uses + Core; + +library + "advapi32 comdlg32 comctl32 user32 gdi32"; + +file + Install.h, + Progress.cpp, + 7zMain.cpp, + Install.cpp, + data.rc, + install.rc, + LZMA readonly separator, + LzmaDecode.c, + LzmaDecode.h, + LzmaTest.c, + 7zAlloc.c, + 7zAlloc.h, + 7zBuffer.c, + 7zBuffer.h, + 7zCrc.c, + 7zCrc.h, + 7zDecode.c, + 7zDecode.h, + 7zExtract.c, + 7zExtract.h, + 7zHeader.c, + 7zHeader.h, + 7zIn.c, + 7zIn.h, + 7zItem.c, + 7zItem.h, + 7zMethodID.c, + 7zMethodID.h, + 7zTypes.h, + 7zC.txt; + +mainconfig + "" = "GUI"; + diff --git a/uppbox/WinInstaller2/init b/uppbox/WinInstaller2/init new file mode 100644 index 000000000..8ffad27ef --- /dev/null +++ b/uppbox/WinInstaller2/init @@ -0,0 +1,4 @@ +#ifndef _WinInstaller2_icpp_init_stub +#define _WinInstaller2_icpp_init_stub +#include "Core/init" +#endif diff --git a/uppbox/uppweb/AUTHORS b/uppbox/uppweb/AUTHORS deleted file mode 100644 index f52ff393f..000000000 --- a/uppbox/uppweb/AUTHORS +++ /dev/null @@ -1,2 +0,0 @@ -Mirek Fidler -Tomas Rylek \ No newline at end of file diff --git a/uppbox/uppweb/COPYING b/uppbox/uppweb/COPYING deleted file mode 100644 index 306c7974b..000000000 --- a/uppbox/uppweb/COPYING +++ /dev/null @@ -1,30 +0,0 @@ -Copyright (C) 2005 Mirek Fidler, Tomas Rylek and various contributors (see AUTHORS) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies of the Software and its Copyright notices. In addition publicly -documented acknowledgment must be given that this software has been used if no -source code of this software is made available publicly. This includes -acknowledgments in either Copyright notices, Manuals, Publicity and Marketing -documents or any documentation provided with any product containing this -software. This License does not apply to any software that links to the -libraries provided by this software (statically or dynamically), but only to -the software provided. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ------------ - -Please see the COPYING.PLAIN for a plain-english explanation of this notice -and it's intent. diff --git a/uppbox/uppweb/COPYING-PLAIN b/uppbox/uppweb/COPYING-PLAIN deleted file mode 100644 index 5b4491072..000000000 --- a/uppbox/uppweb/COPYING-PLAIN +++ /dev/null @@ -1,33 +0,0 @@ -Plain English Copyright Notice - -This file is not intended to be the actual License. The reason this file -exists is that we here are programmers and engineers. We aren't lawyers. We -provide licenses that we THINK say the right things, but we have our own -intentions at heart. This is a plain-english explanation of what those -intentions are, and if you follow them you will be within the "spirit" of -the license. - -The intent is for us to enjoy writing software that is useful to us (the -AUTHORS) and allow others to use it freely and also benefit from the work we -put into making it. We don't want to restrict others using it. They should -not *HAVE* to make the source code of the applications they write that -simply link to these libraries (be that statically or dynamically), or for -them to be limited as to what license they choose to use (be it open, closed -or anything else). But we would like to know you are using these libraries. -We simply would like to know that it has been useful to someone. This is why -we ask for acknowledgement of some sort. - -You can do what you want with the source of this software - it doesn't -matter. We still have it here for ourselves and it is open and free to use -and download and play with. It can't be taken away. We don't really mind what -you do with the source to your software. We would simply like to know that -you are using it - especially if it makes it to a commerical product. If you -simply e-mail all the AUTHORS (see COPYING and AUTHORS files) telling us, and -then make sure you include a paragraph or page in the manual or in the "About.." -box for the product with the copyright notice and state that you used this -software, we will be very happy. If you want to contribute back modifications -and fixes you may have made we will welcome those too with open arms (generally). -If you want help with changes needed, ports needed or features to be added, -arrangements can be easily made with some dialogue. - -Mirek Fidler diff --git a/uppbox/uppweb/uppweb.upp b/uppbox/uppweb/uppweb.upp index 4e0065076..c2775820c 100644 --- a/uppbox/uppweb/uppweb.upp +++ b/uppbox/uppweb/uppweb.upp @@ -40,11 +40,7 @@ file forum_f.txt, forum_h.txt, bench.txt, - 2008.txt, - Info readonly separator, - COPYING, - COPYING-PLAIN, - AUTHORS; + 2008.txt; mainconfig "" = "GUI MT",