mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-21 06:45:39 -06:00
License fixes
git-svn-id: svn://ultimatepp.org/upp/trunk@502 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
d148c48f07
commit
c8afb5fe69
31 changed files with 71 additions and 3411 deletions
|
|
@ -1,2 +0,0 @@
|
|||
Mirek Fidler <cxl@ntllib.org>
|
||||
Tomas Rylek <rylek@volny.cz>
|
||||
|
|
@ -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<int>& 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<String>& Nestfo::GetBases()
|
||||
{
|
||||
if(!bvalid) {
|
||||
bvalid = true;
|
||||
baselist.Clear();
|
||||
if(nesti < 0)
|
||||
return baselist;
|
||||
Vector<int> b;
|
||||
Index<int> bi;
|
||||
Bases(nesti, b);
|
||||
while(b.GetCount()) {
|
||||
Vector<int> 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<String>& 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<String>& 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<String>& 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<String>& 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<String> 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<int> 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<int> 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<String>& pf)
|
||||
{
|
||||
int ni = 0;
|
||||
Vector<int> file;
|
||||
for(int i = 0; i < pf.GetCount(); i++)
|
||||
file.Add(GetCppFileIndex(pf[i]));
|
||||
while(ni < base.GetCount()) {
|
||||
CppNest& n = base[ni];
|
||||
Vector<int> 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;
|
||||
}
|
||||
|
|
@ -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.
|
||||
|
|
@ -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 <cxl@ntllib.org>
|
||||
|
|
@ -1,478 +0,0 @@
|
|||
#ifndef DOCPP_H
|
||||
#define DOCPP_H
|
||||
|
||||
#include <Core/Core.h>
|
||||
|
||||
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<int> & symbols) const;
|
||||
void Merge(const LexSymbolStat & other);
|
||||
|
||||
private:
|
||||
Vector<int> v;
|
||||
int minSymbol;
|
||||
};
|
||||
|
||||
|
||||
class Lex {
|
||||
#ifdef _DEBUG
|
||||
const char *pp;
|
||||
#endif
|
||||
const char *ptr;
|
||||
const char *pos;
|
||||
|
||||
Index<String> id;
|
||||
Index<int> ignore;
|
||||
int endkey;
|
||||
int braceslevel;
|
||||
int ignore_low, ignore_high;
|
||||
|
||||
struct Term : Moveable<Term>{
|
||||
const char *ptr;
|
||||
int code;
|
||||
String text;
|
||||
double number;
|
||||
};
|
||||
|
||||
bool statsCollected;
|
||||
LexSymbolStat symbolStat;
|
||||
BiVector<Term> 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<String>& ignore);
|
||||
void StartStatCollection();
|
||||
const LexSymbolStat & FinishStatCollection();
|
||||
|
||||
Lex();
|
||||
};
|
||||
|
||||
struct SrcFile {
|
||||
SrcFile();
|
||||
String text;
|
||||
Vector<int> 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<CppPos> {
|
||||
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<CppPos> pos;
|
||||
String key;
|
||||
CppWordsHash words;
|
||||
|
||||
void Serialize(Stream& s);
|
||||
|
||||
CppItem() { words.SetAll(); }
|
||||
};
|
||||
|
||||
struct CppNest {
|
||||
int namespacel;
|
||||
Index<String> key;
|
||||
Index<String> name;
|
||||
Array<CppItem> item;
|
||||
|
||||
void Remove(const Vector<int>& 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<String, CppNest> 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<int> GetBases(int i) const;
|
||||
};
|
||||
|
||||
class Parser {
|
||||
struct Context {
|
||||
int namespacel;
|
||||
String nesting;
|
||||
Vector<int> tparam;
|
||||
Index<int> 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<Decl> 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<int, const String&> 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<Decl>& r, const char *p, bool type_def, bool more);
|
||||
Array<Decl> 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<const FunctionStat &> FnEndCallback;
|
||||
|
||||
bool dobody;
|
||||
String current_nest;
|
||||
int current_namespacel;
|
||||
String current_key;
|
||||
CppItem current;
|
||||
int currentScopeDepth;
|
||||
int maxScopeDepth;
|
||||
VectorMap<String, String> local;
|
||||
FnEndCallback whenFnEnd;
|
||||
LexSymbolStat symbolsOutsideFunctions;
|
||||
|
||||
const SrcFile &getPreprocessedFile() { return file; }
|
||||
|
||||
void Do(Stream& s, const Vector<String>& ignore, CppBase& base, const String& fn,
|
||||
Callback2<int, const String&> err, const Vector<String>& typenames = Vector<String>());
|
||||
|
||||
Parser() : dobody(false) {}
|
||||
};
|
||||
|
||||
String NoTemplatePars(const String& type);
|
||||
|
||||
class Nestfo {
|
||||
bool bvalid, nvalid;
|
||||
Vector<String> baselist;
|
||||
Vector<String> nests;
|
||||
int nesti;
|
||||
void Bases(int i, Vector<int>& g);
|
||||
void Init();
|
||||
|
||||
public:
|
||||
const CppBase& base;
|
||||
VectorMap<String, String> cache;
|
||||
|
||||
const Vector<String>& GetBases();
|
||||
const Vector<String>& 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<String>& ignore, CppBase& base, const String& fn,
|
||||
Callback2<int, const String&> err);
|
||||
void Remove(CppBase& base, const Vector<String>& fn);
|
||||
|
||||
#endif
|
||||
|
|
@ -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
|
||||
"" = "";
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,176 +0,0 @@
|
|||
#include "CppBase.h"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma inline_depth(255)
|
||||
#pragma optimize("t", on)
|
||||
#endif
|
||||
|
||||
static Index<String> 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;
|
||||
}
|
||||
|
|
@ -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<int> & 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<String>& 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;
|
||||
}
|
||||
|
|
@ -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)
|
||||
|
|
@ -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)
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
Mirek Fidler <cxl@ntllib.org>
|
||||
Tomas Rylek <rylek@volny.cz>
|
||||
|
|
@ -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.
|
||||
|
|
@ -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 <cxl@ntllib.org>
|
||||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -23,11 +23,7 @@ file
|
|||
DlgFilesSetup.cpp,
|
||||
DlgFilesSetup.lay,
|
||||
DlgFiles.cpp,
|
||||
DlgFiles.lay,
|
||||
Info readonly separator,
|
||||
COPYING,
|
||||
COPYING-PLAIN,
|
||||
AUTHORS;
|
||||
DlgFiles.lay;
|
||||
|
||||
mainconfig
|
||||
"" = "GUI",
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -1,2 +0,0 @@
|
|||
Mirek Fidler <cxl@ntllib.org>
|
||||
Tomas Rylek <rylek@volny.cz>
|
||||
|
|
@ -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.
|
||||
|
|
@ -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 <cxl@ntllib.org>
|
||||
|
|
@ -2,17 +2,15 @@ uses
|
|||
Core,
|
||||
plugin\bz2;
|
||||
|
||||
library "advapi32 comdlg32 comctl32 user32 gdi32";
|
||||
library
|
||||
"advapi32 comdlg32 comctl32 user32 gdi32";
|
||||
|
||||
file
|
||||
Install.h,
|
||||
Progress.cpp,
|
||||
Install.cpp,
|
||||
install.rc,
|
||||
Info readonly separator,
|
||||
COPYING,
|
||||
COPYING-PLAIN,
|
||||
AUTHORS;
|
||||
install.rc;
|
||||
|
||||
mainconfig
|
||||
"" = "GUI";
|
||||
|
||||
|
|
|
|||
5
uppbox/WinInstaller/init
Normal file
5
uppbox/WinInstaller/init
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
#ifndef _WinInstaller_icpp_init_stub
|
||||
#define _WinInstaller_icpp_init_stub
|
||||
#include "Core/init"
|
||||
#include "plugin\bz2/init"
|
||||
#endif
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
Mirek Fidler <cxl@ntllib.org>
|
||||
Tomas Rylek <rylek@volny.cz>
|
||||
|
|
@ -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.
|
||||
|
|
@ -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 <cxl@ntllib.org>
|
||||
|
|
@ -34,11 +34,8 @@ file
|
|||
7zMethodID.c,
|
||||
7zMethodID.h,
|
||||
7zTypes.h,
|
||||
7zC.txt,
|
||||
Info readonly separator,
|
||||
COPYING,
|
||||
COPYING-PLAIN,
|
||||
AUTHORS;
|
||||
7zC.txt;
|
||||
|
||||
mainconfig
|
||||
"" = "GUI";
|
||||
|
||||
|
|
|
|||
4
uppbox/WinInstaller2/init
Normal file
4
uppbox/WinInstaller2/init
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
#ifndef _WinInstaller2_icpp_init_stub
|
||||
#define _WinInstaller2_icpp_init_stub
|
||||
#include "Core/init"
|
||||
#endif
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
Mirek Fidler <cxl@ntllib.org>
|
||||
Tomas Rylek <rylek@volny.cz>
|
||||
|
|
@ -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.
|
||||
|
|
@ -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 <cxl@ntllib.org>
|
||||
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue