Browse Source

Fix trailing whitespace in multiple files

Also fix formatting of CODING_GUIDELINES.md
adaptive-webui-19844
FranciscoPombal 4 years ago
parent
commit
ef1c7eec74
  1. 2
      AUTHORS
  2. 220
      CODING_GUIDELINES.md
  3. 2
      dist/unix/org.qbittorrent.qBittorrent.desktop
  4. 8
      dist/windows/UAC.nsh
  5. 4
      m4/pkg.m4
  6. 2
      src/gui/executionlogwidget.h
  7. 440
      src/gui/gpl.html
  8. 2
      src/gui/gui.pri
  9. 6
      src/icons/build-icons/Gruntfile.js
  10. 26
      src/searchengine/nova3/socks.py
  11. 2
      src/webui/api/appcontroller.h
  12. 16
      src/webui/www/tstool.py

2
AUTHORS

@ -87,7 +87,7 @@ Images Authors:
* file: src/icons/oxygen/checked.png * file: src/icons/oxygen/checked.png
copyright: Victor Buinsky <allok.victor@gmail.com> copyright: Victor Buinsky <allok.victor@gmail.com>
* file: src/icons/skin/ratio.png * file: src/icons/skin/ratio.png
copyright: Fatcow Web Hosting copyright: Fatcow Web Hosting
license: Creative Commons Attribution 3.0 License license: Creative Commons Attribution 3.0 License

220
CODING_GUIDELINES.md

@ -1,12 +1,14 @@
All new code **must** follow the following coding guidelines. # Coding Guidelines
If you make changes in a file that still uses another coding style, make sure that you follow these guidelines for your changes.
All new code **must** follow the following coding guidelines. \
If you make changes in a file that still uses another coding style, make sure that you follow these guidelines for your changes. \
For programming languages other than C++ (e.g. JavaScript) used in this repository and submodules, unless otherwise specified, coding guidelines listed here applies as much as possible. For programming languages other than C++ (e.g. JavaScript) used in this repository and submodules, unless otherwise specified, coding guidelines listed here applies as much as possible.
**Note 1:** I will not take your head if you forget and use another style. However, most probably the request will be delayed until you fix your coding style. **Note 1:** I will not take your head if you forget and use another style. However, most probably the request will be delayed until you fix your coding style. \
**Note 2:** You can use the `uncrustify` program/tool to clean up any source file. Use it with the `uncrustify.cfg` configuration file found in the root folder. **Note 2:** You can use the `uncrustify` program/tool to clean up any source file. Use it with the `uncrustify.cfg` configuration file found in the root folder. \
**Note 3:** There is also a style for QtCreator but it doesn't cover all cases. In QtCreator `Tools->Options...->C++->Code Style->Import...` and choose the `codingStyleQtCreator.xml` file found in the root folder. **Note 3:** There is also a style for QtCreator but it doesn't cover all cases. In QtCreator `Tools->Options...->C++->Code Style->Import...` and choose the `codingStyleQtCreator.xml` file found in the root folder.
### Table Of Contents ## Table Of Contents
* [1. New lines &amp; curly braces](#1-new-lines--curly-braces) * [1. New lines &amp; curly braces](#1-new-lines--curly-braces)
* [a. Function blocks, class/struct definitions, namespaces](#a-function-blocks-classstruct-definitions-namespaces) * [a. Function blocks, class/struct definitions, namespaces](#a-function-blocks-classstruct-definitions-namespaces)
@ -29,11 +31,13 @@ For programming languages other than C++ (e.g. JavaScript) used in this reposito
* [9. Misc](#9-misc) * [9. Misc](#9-misc)
* [10. Git commit message](#10-git-commit-message) * [10. Git commit message](#10-git-commit-message)
* [11. Not covered above](#11-not-covered-above) * [11. Not covered above](#11-not-covered-above)
--- ---
### 1. New lines & curly braces ### ## 1. New lines & curly braces
### a. Function blocks, class/struct definitions, namespaces
#### a. Function blocks, class/struct definitions, namespaces ####
```c++ ```c++
int myFunction(int a) int myFunction(int a)
{ {
@ -79,7 +83,8 @@ namespace Name
} }
``` ```
#### b. Other code blocks #### ### b. Other code blocks
```c++ ```c++
if (condition) { if (condition) {
// code // code
@ -99,7 +104,8 @@ default:
} }
``` ```
#### c. Blocks in switch's case labels #### ### c. Blocks in switch's case labels
```c++ ```c++
switch (var) { switch (var) {
case 1: { case 1: {
@ -117,8 +123,10 @@ default:
} }
``` ```
#### d. If-else statements #### ### d. If-else statements
The `else if`/`else` must be on their own lines: The `else if`/`else` must be on their own lines:
```c++ ```c++
if (condition) { if (condition) {
// code // code
@ -131,8 +139,10 @@ else {
} }
``` ```
#### e. Single statement if blocks #### ### e. Single statement if blocks
Most single statement if blocks should look like this: Most single statement if blocks should look like this:
```c++ ```c++
if (condition) if (condition)
a = a + b; a = a + b;
@ -141,6 +151,7 @@ if (condition)
One acceptable exception to this can be `return`, `break` or `continue` statements, One acceptable exception to this can be `return`, `break` or `continue` statements,
provided that the test condition isn't very long and its body statement occupies only one line. provided that the test condition isn't very long and its body statement occupies only one line.
However you can still choose to use the first rule. However you can still choose to use the first rule.
```c++ ```c++
if (a > 0) return; if (a > 0) return;
@ -150,10 +161,12 @@ while (p) {
} }
``` ```
#### f. Acceptable conditions to omit braces #### ### f. Acceptable conditions to omit braces
When the conditional statement in `if`/`else` has only one line and its body occupy only one line, When the conditional statement in `if`/`else` has only one line and its body occupy only one line,
this also applies to loops statements. this also applies to loops statements. \
Notice that for a series of `if - else` branches, if one branch needs braces then all branches must add braces. Notice that for a series of `if - else` branches, if one branch needs braces then all branches must add braces.
```c++ ```c++
if (a < b) // conditional statement if (a < b) // conditional statement
do(a); // body do(a); // body
@ -177,9 +190,11 @@ else {
} }
``` ```
#### g. Brace enclosed initializers #### ### g. Brace enclosed initializers
Unlike single-line functions, you must not insert spaces between the brackets and concluded expressions.<br/>
Unlike single-line functions, you must not insert spaces between the brackets and concluded expressions. \
But you must insert a space between the variable name and initializer. But you must insert a space between the variable name and initializer.
```c++ ```c++
Class obj {}; // empty Class obj {}; // empty
Class obj {expr}; Class obj {expr};
@ -187,15 +202,18 @@ Class obj {expr1, /*...,*/ exprN};
QVariantMap map {{"key1", 5}, {"key2", 10}}; QVariantMap map {{"key1", 5}, {"key2", 10}};
``` ```
### 2. Indentation ### ## 2. Indentation
4 spaces. 4 spaces.
### 3. File encoding and line endings ### ## 3. File encoding and line endings
UTF-8 and Unix-like line ending (LF). Unless some platform specific files need other encodings/line endings. UTF-8 and Unix-like line ending (LF). Unless some platform specific files need other encodings/line endings.
### 4. Initialization lists ### ## 4. Initialization lists
Initialization lists should be vertical. This will allow for more easily readable diffs. The initialization colon should be indented and in its own line along with first argument. The rest of the arguments should be indented too and have the comma prepended. Initialization lists should be vertical. This will allow for more easily readable diffs. The initialization colon should be indented and in its own line along with first argument. The rest of the arguments should be indented too and have the comma prepended.
```c++ ```c++
myClass::myClass(int a, int b, int c, int d) myClass::myClass(int a, int b, int c, int d)
: m_a(a) : m_a(a)
@ -207,8 +225,10 @@ myClass::myClass(int a, int b, int c, int d)
} }
``` ```
### 5. Enums ### ## 5. Enums
Enums should be vertical. This will allow for more easily readable diffs. The members should be indented. Enums should be vertical. This will allow for more easily readable diffs. The members should be indented.
```c++ ```c++
enum Days enum Days
{ {
@ -222,11 +242,14 @@ enum Days
}; };
``` ```
### 6. Names ### ## 6. Names
All names should be camelCased. All names should be camelCased.
#### a. Type names and namespaces #### ### a. Type names and namespaces
Type names and namespaces start with Upper case letter (except POD types). Type names and namespaces start with Upper case letter (except POD types).
```c++ ```c++
class ClassName {}; class ClassName {};
@ -241,14 +264,18 @@ namespace NamespaceName
} }
``` ```
#### b. Variable names #### ### b. Variable names
Variable names start with lower case letter. Variable names start with lower case letter.
```c++ ```c++
int myVar; int myVar;
``` ```
#### c. Private member variable names #### ### c. Private member variable names
Private member variable names start with lower case letter and should have ```m_``` prefix. Private member variable names start with lower case letter and should have ```m_``` prefix.
```c++ ```c++
class MyClass class MyClass
{ {
@ -256,23 +283,26 @@ class MyClass
} }
``` ```
### 7. Header inclusion order ### ## 7. Header inclusion order
The headers should be placed in the following group order: The headers should be placed in the following group order:
1. Module header (in .cpp)
2. C++ Standard Library headers 1. Module header (in .cpp)
3. System headers 2. C++ Standard Library headers
4. Boost library headers 3. System headers
5. Libtorrent headers 4. Boost library headers
6. Qt headers 5. Libtorrent headers
7. qBittorrent's own headers, starting from the *base* headers. 6. Qt headers
7. qBittorrent's own headers, starting from the *base* headers.
The headers should be ordered alphabetically within each group.
If there are conditionals for the same header group, then put them at the bottom of the respective group. The headers should be ordered alphabetically within each group. \
If there are conditionals for the same header group, then put them at the bottom of the respective group. \
If there are conditionals that contain headers from several different header groups, then put them above the "qBittorrent's own headers" group. If there are conditionals that contain headers from several different header groups, then put them above the "qBittorrent's own headers" group.
One exception is the header containing the library version (for example, QtGlobal), this particular header isn't constrained by the aforementioned order. One exception is the header containing the library version (for example, QtGlobal), this particular header isn't constrained by the aforementioned order.
Example: Example:
```c++ ```c++
// file: examplewidget.cpp // file: examplewidget.cpp
@ -322,8 +352,10 @@ Example:
#include "ui_examplewidget.h" #include "ui_examplewidget.h"
``` ```
### 8. Include guard ### ## 8. Include guard
`#pragma once` should be used instead of "include guard" in new code: `#pragma once` should be used instead of "include guard" in new code:
```c++ ```c++
// examplewidget.h // examplewidget.h
@ -338,75 +370,73 @@ class ExampleWidget : public QWidget
``` ```
### 9. Misc ### ## 9. Misc
* Line breaks for long lines with operation: * Line breaks for long lines with operation:
```c++ ```c++
a += "b" a += "b"
+ "c" + "c"
+ "d"; + "d";
``` ```
* **auto** keyword * **auto** keyword
We allow the use of the **auto** keyword only where it is strictly necessary We allow the use of the **auto** keyword only where it is strictly necessary (for example, to declare a lambda object, etc.), or where it **enhances** the readability of the code. \
(for example, to declare a lambda object, etc.), or where it **enhances** the readability of the code. Declarations for which one can gather enough information about the object interface (type) from its name or the usage pattern (an iterator or a loop variable are good examples of clear patterns) or the right part of the expression nicely fit here.
Declarations for which one can gather enough information about the object interface (type) from its name
or the usage pattern (an iterator or a loop variable are good examples of clear patterns)
or the right part of the expression nicely fit here.<br/>
<br/>
When weighing whether to use an auto-typed variable please think about potential reviewers of your code,
who will read it as a plain diff (on github.com, for instance). Please make sure that such reviewers can
understand the code completely and without excessive effort.<br/>
<br/>
Some valid use cases:
```c++
template <typename List>
void doSomethingWithList(const List &list)
{
foreach (const auto &item, list) {
// we don't know item type here so we use 'auto' keyword
// do something with item
}
}
for (auto it = container.begin(), end = container.end(); it != end; ++it) { When weighing whether to use an auto-typed variable please think about potential reviewers of your code, who will read it as a plain diff (on github.com, for instance). \
// we don't need to know the exact iterator type, Please make sure that such reviewers can understand the code completely and without excessive effort.
// because all iterators have the same interface
}
auto spinBox = static_cast<QSpinBox*>(sender()); Some valid use cases:
// we know the variable type based on the right-hand expression
```
* Notice the spaces in the following specific situations: * Container iteration and casts:
```c++
// Before and after the assignment and other binary (and ternary) operators there should be a space
// There should not be a space between increment/decrement and its operand
a += 20;
a = (b <= MAX_B ? b : MAX_B);
++a;
--b;
for (int a = 0; a < b; ++b) { ```c++
} template <typename List>
void doSomethingWithList(const List &list)
{
foreach (const auto &item, list) {
// we don't know item type here so we use 'auto' keyword
// do something with item
}
}
// Range-based for loop, spaces before and after the colon for (auto it = container.begin(), end = container.end(); it != end; ++it) {
for (auto i : container) { // we don't need to know the exact iterator type,
} // because all iterators have the same interface
}
// Derived class, spaces before and after the colon auto spinBox = static_cast<QSpinBox*>(sender());
class Derived : public Base // we know the variable type based on the right-hand expression
{ ```
};
``` * Notice the spaces in the following specific situations:
```c++
// Before and after the assignment and other binary (and ternary) operators there should be a space
// There should not be a space between increment/decrement and its operand
a += 20;
a = (b <= MAX_B ? b : MAX_B);
++a;
--b;
for (int a = 0; a < b; ++b) {
}
// Range-based for loop, spaces before and after the colon
for (auto i : container) {
}
// Derived class, spaces before and after the colon
class Derived : public Base
{
};
```
* Prefer pre-increment, pre-decrement operators * Prefer pre-increment, pre-decrement operators
```c++
++i, --j; // Yes ```c++
i++, j--; // No ++i, --j; // Yes
``` i++, j--; // No
```
* private/public/protected must not be indented * private/public/protected must not be indented
@ -414,7 +444,8 @@ i++, j--; // No
* Method definitions aren't allowed in header files * Method definitions aren't allowed in header files
### 10. Git commit message ### ## 10. Git commit message
1. Limit the subject line to 50 characters. Subject should contain only the very essence of the changes (you should avoid extra details and internals) 1. Limit the subject line to 50 characters. Subject should contain only the very essence of the changes (you should avoid extra details and internals)
2. Separate subject from body with a blank line 2. Separate subject from body with a blank line
3. Capitalize the subject line 3. Capitalize the subject line
@ -424,6 +455,7 @@ i++, j--; // No
7. Use the body to explain what and why vs. how 7. Use the body to explain what and why vs. how
8. If commit fixes a reported issue, mention it in the message body (e.g. `Closes #4134.`) 8. If commit fixes a reported issue, mention it in the message body (e.g. `Closes #4134.`)
### 11. Not covered above ### ## 11. Not covered above
If something isn't covered above, just follow the same style the file you are editing has.
If something isn't covered above, just follow the same style the file you are editing has. \
*This guide is not exhaustive and the style for a particular piece of code not specified here will be determined by project members on code review.* *This guide is not exhaustive and the style for a particular piece of code not specified here will be determined by project members on code review.*

2
dist/unix/org.qbittorrent.qBittorrent.desktop vendored

@ -147,7 +147,7 @@ Comment[uz@Latn]=BitTorrent orqali fayllarni yuklab olish va baham ko‘rish
GenericName[uz@Latn]=BitTorrent mijozi GenericName[uz@Latn]=BitTorrent mijozi
Name[uz@Latn]=qBittorrent Name[uz@Latn]=qBittorrent
Comment[te]=కిిమతిి , పి Comment[te]=కిిమతిి , పి
GenericName[te]=కిలయి GenericName[te]=కిలయి
Name[te]=కి Name[te]=కి
Comment[hi_IN]= अपनइल BitTorrent कयम सउनलड आर स कर Comment[hi_IN]= अपनइल BitTorrent कयम सउनलड आर स कर
GenericName[hi_IN]=BitTorrent उपभ GenericName[hi_IN]=BitTorrent उपभ

8
dist/windows/UAC.nsh vendored

@ -22,7 +22,7 @@ Interactive User (MediumIL) Admin user (HighIL)
!ifndef UAC_HDR__INC !ifndef UAC_HDR__INC
!verbose push !verbose push
!verbose 3 !verbose 3
!ifndef UAC_VERBOSE !ifndef UAC_VERBOSE
!define UAC_VERBOSE 3 !define UAC_VERBOSE 3
!endif !endif
!verbose ${UAC_VERBOSE} !verbose ${UAC_VERBOSE}
@ -195,7 +195,7 @@ _UAC_L_E_${__UAC_L}:
!endif !endif
!insertmacro UAC_AsUser_Call Label _UAC_L_F_${__UAC_L} ${UAC_SYNCREGISTERS}|${UAC_SYNCOUTDIR}|${UAC_SYNCINSTDIR} #|${UAC_CLEARERRFLAG} !insertmacro UAC_AsUser_Call Label _UAC_L_F_${__UAC_L} ${UAC_SYNCREGISTERS}|${UAC_SYNCOUTDIR}|${UAC_SYNCINSTDIR} #|${UAC_CLEARERRFLAG}
!if "${workdir}" != "" !if "${workdir}" != ""
pop $outdir pop $outdir
SetOutPath $outdir SetOutPath $outdir
!endif !endif
!macroend !macroend
@ -265,7 +265,7 @@ pop $_LOGICLIB_TEMP
!macroend !macroend
!macro _UAC_AsUser_GenOp outvar op opparam1 opparam2 !macro _UAC_AsUser_GenOp outvar op opparam1 opparam2
!define _UAC_AUGOGR_ID _UAC_AUGOGR_OP${outvar}${op}${opparam1}${opparam2} !define _UAC_AUGOGR_ID _UAC_AUGOGR_OP${outvar}${op}${opparam1}${opparam2}
!ifndef ${_UAC_AUGOGR_ID} ;Has this exact action been done before? !ifndef ${_UAC_AUGOGR_ID} ;Has this exact action been done before?
!if ${outvar} == $0 !if ${outvar} == $0
!define ${_UAC_AUGOGR_ID} $1 !define ${_UAC_AUGOGR_ID} $1
!else !else
@ -277,7 +277,7 @@ pop $_LOGICLIB_TEMP
!else !else
!define _UAC_AUGOGR_OPP1 ${opparam1} !define _UAC_AUGOGR_OPP1 ${opparam1}
!define _UAC_AUGOGR_OPP2 ${${_UAC_AUGOGR_ID}} !define _UAC_AUGOGR_OPP2 ${${_UAC_AUGOGR_ID}}
!endif !endif
goto ${_UAC_AUGOGR_ID}_C goto ${_UAC_AUGOGR_ID}_C
${_UAC_AUGOGR_ID}_F: ${_UAC_AUGOGR_ID}_F:
${op} ${_UAC_AUGOGR_OPP1} ${_UAC_AUGOGR_OPP2} ${op} ${_UAC_AUGOGR_OPP1} ${_UAC_AUGOGR_OPP2}

4
m4/pkg.m4

@ -1,6 +1,6 @@
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
# serial 1 (pkg-config-0.24) # serial 1 (pkg-config-0.24)
# #
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
@ -123,7 +123,7 @@ if test $pkg_failed = yes; then
_PKG_SHORT_ERRORS_SUPPORTED _PKG_SHORT_ERRORS_SUPPORTED
if test $_pkg_short_errors_supported = yes; then if test $_pkg_short_errors_supported = yes; then
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
else else
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
fi fi
# Put the nasty error message in config.log where it belongs # Put the nasty error message in config.log where it belongs

2
src/gui/executionlogwidget.h

@ -49,7 +49,7 @@ class ExecutionLogWidget : public QWidget
public: public:
ExecutionLogWidget(Log::MsgTypes types, QWidget *parent); ExecutionLogWidget(Log::MsgTypes types, QWidget *parent);
~ExecutionLogWidget(); ~ExecutionLogWidget();
void setMessageTypes(Log::MsgTypes types); void setMessageTypes(Log::MsgTypes types);
private: private:

440
src/gui/gpl.html

@ -17,42 +17,42 @@ modify file(s), you may extend this exception to your version of the file(s),
but you are not obligated to do so. If you do not wish to do so, delete this but you are not obligated to do so. If you do not wish to do so, delete this
exception statement from your version.</p> exception statement from your version.</p>
---------- ----------
<h2>GNU General Public License, version 2</h2> <h2>GNU General Public License, version 2</h2>
<hr> <hr>
<h3>Table of Contents</h3> <h3>Table of Contents</h3>
<ul> <ul>
<li><a name="TOC1" href="#SEC1">GNU GENERAL PUBLIC <li><a name="TOC1" href="#SEC1">GNU GENERAL PUBLIC
LICENSE<!--TRANSLATORS: Don't translate the license; copy msgid's LICENSE<!--TRANSLATORS: Don't translate the license; copy msgid's
verbatim!--></a> verbatim!--></a>
<ul> <ul>
<li><a name="TOC2" href="#SEC2">Preamble</a></li> <li><a name="TOC2" href="#SEC2">Preamble</a></li>
<li><a name="TOC3" href="#SEC3">TERMS AND CONDITIONS <li><a name="TOC3" href="#SEC3">TERMS AND CONDITIONS
FOR COPYING, DISTRIBUTION AND MODIFICATION</a></li> FOR COPYING, DISTRIBUTION AND MODIFICATION</a></li>
<li><a name="TOC4" href="#SEC4">How to Apply These <li><a name="TOC4" href="#SEC4">How to Apply These
Terms to Your New Programs</a></li> Terms to Your New Programs</a></li>
</ul></li> </ul></li>
</ul> </ul>
<hr> <hr>
<h3><a name="SEC1" href="#TOC1">GNU GENERAL PUBLIC LICENSE</a></h3> <h3><a name="SEC1" href="#TOC1">GNU GENERAL PUBLIC LICENSE</a></h3>
<p> <p>
Version 2, June 1991 Version 2, June 1991
</p> </p>
<pre> <pre>
Copyright (C) 1989, 1991 Free Software Foundation, Inc. Copyright (C) 1989, 1991 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
Everyone is permitted to copy and distribute verbatim copies Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed. of this license document, but changing it is not allowed.
</pre> </pre>
<h3><a name="preamble"></a><a name="SEC2" href="#TOC2">Preamble</a></h3> <h3><a name="preamble"></a><a name="SEC2" href="#TOC2">Preamble</a></h3>
<p> <p>
The licenses for most software are designed to take away your The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free License is intended to guarantee your freedom to share and change free
@ -62,66 +62,66 @@ Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to the GNU Lesser General Public License instead.) You can apply it to
your programs, too. your programs, too.
</p> </p>
<p> <p>
When we speak of free software, we are referring to freedom, not When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things. in new free programs; and that you know you can do these things.
</p> </p>
<p> <p>
To protect your rights, we need to make restrictions that forbid To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights. anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it. distribute copies of the software, or if you modify it.
</p> </p>
<p> <p>
For example, if you distribute copies of such a program, whether For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their source code. And you must show them these terms so they know their
rights. rights.
</p> </p>
<p> <p>
We protect your rights with two steps: (1) copyright the software, and We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy, (2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software. distribute and/or modify the software.
</p> </p>
<p> <p>
Also, for each author's protection and ours, we want to make certain Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original that any problems introduced by others will not reflect on the original
authors' reputations. authors' reputations.
</p> </p>
<p> <p>
Finally, any free program is threatened constantly by software Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all. patent must be licensed for everyone's free use or not licensed at all.
</p> </p>
<p> <p>
The precise terms and conditions for copying, distribution and The precise terms and conditions for copying, distribution and
modification follow. modification follow.
</p> </p>
<h3><a name="terms"></a><a name="SEC3" href="#TOC3">TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION</a></h3> <h3><a name="terms"></a><a name="SEC3" href="#TOC3">TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION</a></h3>
<a name="section0"></a><p> <a name="section0"></a><p>
<strong>0.</strong> <strong>0.</strong>
This License applies to any program or other work which contains This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below, under the terms of this General Public License. The "Program", below,
@ -131,19 +131,19 @@ that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you". the term "modification".) Each licensee is addressed as "you".
</p> </p>
<p> <p>
Activities other than copying, distribution and modification are not Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program). Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does. Whether that is true depends on what the Program does.
</p> </p>
<a name="section1"></a><p> <a name="section1"></a><p>
<strong>1.</strong> <strong>1.</strong>
You may copy and distribute verbatim copies of the Program's You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate conspicuously and appropriately publish on each copy an appropriate
@ -151,39 +151,39 @@ copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty; notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License and give any other recipients of the Program a copy of this License
along with the Program. along with the Program.
</p> </p>
<p> <p>
You may charge a fee for the physical act of transferring a copy, and You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee. you may at your option offer warranty protection in exchange for a fee.
</p> </p>
<a name="section2"></a><p> <a name="section2"></a><p>
<strong>2.</strong> <strong>2.</strong>
You may modify your copy or copies of the Program or any portion You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1 distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions: above, provided that you also meet all of these conditions:
</p> </p>
<dl> <dl>
<dt></dt> <dt></dt>
<dd> <dd>
<strong>a)</strong> <strong>a)</strong>
You must cause the modified files to carry prominent notices You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change. stating that you changed the files and the date of any change.
</dd> </dd>
<dt></dt> <dt></dt>
<dd> <dd>
<strong>b)</strong> <strong>b)</strong>
You must cause any work that you distribute or publish, that in You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License. parties under the terms of this License.
</dd> </dd>
<dt></dt> <dt></dt>
<dd> <dd>
<strong>c)</strong> <strong>c)</strong>
If the modified program normally reads commands interactively If the modified program normally reads commands interactively
when run, you must cause it, when started running for such when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an interactive use in the most ordinary way, to print or display an
@ -194,10 +194,10 @@ above, provided that you also meet all of these conditions:
License. (Exception: if the Program itself is interactive but License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on does not normally print such an announcement, your work based on
the Program is not required to print an announcement.) the Program is not required to print an announcement.)
</dd> </dd>
</dl> </dl>
<p> <p>
These requirements apply to the modified work as a whole. If These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program, identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in and can be reasonably considered independent and separate works in
@ -207,62 +207,62 @@ distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it. entire whole, and thus to each and every part regardless of who wrote it.
</p> </p>
<p> <p>
Thus, it is not the intent of this section to claim rights or contest Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or exercise the right to control the distribution of derivative or
collective works based on the Program. collective works based on the Program.
</p> </p>
<p> <p>
In addition, mere aggregation of another work not based on the Program In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under a storage or distribution medium does not bring the other work under
the scope of this License. the scope of this License.
</p> </p>
<a name="section3"></a><p> <a name="section3"></a><p>
<strong>3.</strong> <strong>3.</strong>
You may copy and distribute the Program (or a work based on it, You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following: Sections 1 and 2 above provided that you also do one of the following:
</p> </p>
<!-- we use this doubled UL to get the sub-sections indented, --> <!-- we use this doubled UL to get the sub-sections indented, -->
<!-- while making the bullets as unobvious as possible. --> <!-- while making the bullets as unobvious as possible. -->
<dl> <dl>
<dt></dt> <dt></dt>
<dd> <dd>
<strong>a)</strong> <strong>a)</strong>
Accompany it with the complete corresponding machine-readable Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or, 1 and 2 above on a medium customarily used for software interchange; or,
</dd> </dd>
<dt></dt> <dt></dt>
<dd> <dd>
<strong>b)</strong> <strong>b)</strong>
Accompany it with a written offer, valid for at least three Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or, customarily used for software interchange; or,
</dd> </dd>
<dt></dt> <dt></dt>
<dd> <dd>
<strong>c)</strong> <strong>c)</strong>
Accompany it with the information you received as to the offer Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such received the program in object code or executable form with such
an offer, in accord with Subsection b above.) an offer, in accord with Subsection b above.)
</dd> </dd>
</dl> </dl>
<p> <p>
The source code for a work means the preferred form of the work for The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any code means all the source code for all modules it contains, plus any
@ -273,18 +273,18 @@ anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component operating system on which the executable runs, unless that component
itself accompanies the executable. itself accompanies the executable.
</p> </p>
<p> <p>
If distribution of executable or object code is made by offering If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not distribution of the source code, even though third parties are not
compelled to copy the source along with the object code. compelled to copy the source along with the object code.
</p> </p>
<a name="section4"></a><p> <a name="section4"></a><p>
<strong>4.</strong> <strong>4.</strong>
You may not copy, modify, sublicense, or distribute the Program You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is otherwise to copy, modify, sublicense or distribute the Program is
@ -292,10 +292,10 @@ void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such this License will not have their licenses terminated so long as such
parties remain in full compliance. parties remain in full compliance.
</p> </p>
<a name="section5"></a><p> <a name="section5"></a><p>
<strong>5.</strong> <strong>5.</strong>
You are not required to accept this License, since you have not You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are distribute the Program or its derivative works. These actions are
@ -304,10 +304,10 @@ modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying all its terms and conditions for copying, distributing or modifying
the Program or works based on it. the Program or works based on it.
</p> </p>
<a name="section6"></a><p> <a name="section6"></a><p>
<strong>6.</strong> <strong>6.</strong>
Each time you redistribute the Program (or any work based on the Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to original licensor to copy, distribute or modify the Program subject to
@ -315,10 +315,10 @@ these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein. restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to You are not responsible for enforcing compliance by third parties to
this License. this License.
</p> </p>
<a name="section7"></a><p> <a name="section7"></a><p>
<strong>7.</strong> <strong>7.</strong>
If, as a consequence of a court judgment or allegation of patent If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues), infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or conditions are imposed on you (whether by court order, agreement or
@ -331,16 +331,16 @@ license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program. refrain entirely from distribution of the Program.
</p> </p>
<p> <p>
If any portion of this section is held invalid or unenforceable under If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other apply and the section as a whole is intended to apply in other
circumstances. circumstances.
</p> </p>
<p> <p>
It is not the purpose of this section to induce you to infringe any It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the such claims; this section has the sole purpose of protecting the
@ -351,15 +351,15 @@ through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot to distribute software through any other system and a licensee cannot
impose that choice. impose that choice.
</p> </p>
<p> <p>
This section is intended to make thoroughly clear what is believed to This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License. be a consequence of the rest of this License.
</p> </p>
<a name="section8"></a><p> <a name="section8"></a><p>
<strong>8.</strong> <strong>8.</strong>
If the distribution and/or use of the Program is restricted in If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License original copyright holder who places the Program under this License
@ -367,17 +367,17 @@ may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License. the limitation as if written in the body of this License.
</p> </p>
<a name="section9"></a><p> <a name="section9"></a><p>
<strong>9.</strong> <strong>9.</strong>
The Free Software Foundation may publish revised and/or new versions The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to be similar in spirit to the present version, but may differ in detail to
address new problems or concerns. address new problems or concerns.
</p> </p>
<p> <p>
Each version is given a distinguishing version number. If the Program Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions later version", you have the option of following the terms and conditions
@ -385,10 +385,10 @@ either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software this License, you may choose any version ever published by the Free Software
Foundation. Foundation.
</p> </p>
<a name="section10"></a><p> <a name="section10"></a><p>
<strong>10.</strong> <strong>10.</strong>
If you wish to incorporate parts of the Program into other free If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free to ask for permission. For software which is copyrighted by the Free
@ -396,12 +396,12 @@ Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally. of promoting the sharing and reuse of software generally.
</p> </p>
<a name="section11"></a><p><strong>NO WARRANTY</strong></p> <a name="section11"></a><p><strong>NO WARRANTY</strong></p>
<p> <p>
<strong>11.</strong> <strong>11.</strong>
BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
@ -411,10 +411,10 @@ MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION. REPAIR OR CORRECTION.
</p> </p>
<a name="section12"></a><p> <a name="section12"></a><p>
<strong>12.</strong> <strong>12.</strong>
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
@ -424,93 +424,93 @@ TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES. POSSIBILITY OF SUCH DAMAGES.
</p> </p>
<h3>END OF TERMS AND CONDITIONS</h3> <h3>END OF TERMS AND CONDITIONS</h3>
<h3><a name="howto"></a><a name="SEC4" href="#TOC4">How to Apply These Terms to Your New Programs</a></h3> <h3><a name="howto"></a><a name="SEC4" href="#TOC4">How to Apply These Terms to Your New Programs</a></h3>
<p> <p>
If you develop a new program, and you want it to be of the greatest If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms. free software which everyone can redistribute and change under these terms.
</p> </p>
<p> <p>
To do so, attach the following notices to the program. It is safest To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found. the "copyright" line and a pointer to where the full notice is found.
</p> </p>
<pre> <pre>
<var>one line to give the program's name and an idea of what it does.</var> <var>one line to give the program's name and an idea of what it does.</var>
Copyright (C) <var>yyyy</var> <var>name of author</var> Copyright (C) <var>yyyy</var> <var>name of author</var>
This program is free software; you can redistribute it and/or This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2 as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version. of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301, USA. MA 02110-1301, USA.
</pre> </pre>
<p> <p>
Also add information on how to contact you by electronic and paper mail. Also add information on how to contact you by electronic and paper mail.
</p> </p>
<p> <p>
If the program is interactive, make it output a short notice like this If the program is interactive, make it output a short notice like this
when it starts in an interactive mode: when it starts in an interactive mode:
</p> </p>
<pre> <pre>
Gnomovision version 69, Copyright (C) <var>year</var> <var>name of author</var> Gnomovision version 69, Copyright (C) <var>year</var> <var>name of author</var>
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details Gnomovision comes with ABSOLUTELY NO WARRANTY; for details
type `show w'. This is free software, and you are welcome type `show w'. This is free software, and you are welcome
to redistribute it under certain conditions; type `show c' to redistribute it under certain conditions; type `show c'
for details. for details.
</pre> </pre>
<p> <p>
The hypothetical commands <samp>`show w'</samp> and <samp>`show c'</samp> should show The hypothetical commands <samp>`show w'</samp> and <samp>`show c'</samp> should show
the appropriate parts of the General Public License. Of course, the the appropriate parts of the General Public License. Of course, the
commands you use may be called something other than <samp>`show w'</samp> and commands you use may be called something other than <samp>`show w'</samp> and
<samp>`show c'</samp>; they could even be mouse-clicks or menu items--whatever <samp>`show c'</samp>; they could even be mouse-clicks or menu items--whatever
suits your program. suits your program.
</p> </p>
<p> <p>
You should also get your employer (if you work as a programmer) or your You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names: necessary. Here is a sample; alter the names:
</p> </p>
<pre> <pre>
Yoyodyne, Inc., hereby disclaims all copyright Yoyodyne, Inc., hereby disclaims all copyright
interest in the program `Gnomovision' interest in the program `Gnomovision'
(which makes passes at compilers) written (which makes passes at compilers) written
by James Hacker. by James Hacker.
<var>signature of Ty Coon</var>, 1 April 1989 <var>signature of Ty Coon</var>, 1 April 1989
Ty Coon, President of Vice Ty Coon, President of Vice
</pre> </pre>
<p> <p>
This General Public License does not permit incorporating your program into This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the library. If this is what you want to do, use the
<a href="https://www.gnu.org/licenses/lgpl.html">GNU Lesser General Public License</a> <a href="https://www.gnu.org/licenses/lgpl.html">GNU Lesser General Public License</a>
instead of this License. instead of this License.
</p> </p>
</body> </body>

2
src/gui/gui.pri

@ -169,7 +169,7 @@ unix:!macx:dbus {
HEADERS += \ HEADERS += \
$$PWD/powermanagement/powermanagement_x11.h \ $$PWD/powermanagement/powermanagement_x11.h \
$$PWD/qtnotify/notifications.h $$PWD/qtnotify/notifications.h
SOURCES += \ SOURCES += \
$$PWD/powermanagement/powermanagement_x11.cpp \ $$PWD/powermanagement/powermanagement_x11.cpp \
$$PWD/qtnotify/notifications.cpp $$PWD/qtnotify/notifications.cpp

6
src/icons/build-icons/Gruntfile.js

@ -1,5 +1,5 @@
module.exports = function(grunt) { module.exports = function(grunt) {
grunt.initConfig({ grunt.initConfig({
svg2png: { svg2png: {
all: { all: {
@ -7,7 +7,7 @@ module.exports = function(grunt) {
size: 256 size: 256
}, },
files: [ files: [
{ {
src: ['icons/*.svg'] src: ['icons/*.svg']
} }
] ]
@ -16,7 +16,7 @@ module.exports = function(grunt) {
}); });
grunt.loadNpmTasks('grunt-svg2png'); grunt.loadNpmTasks('grunt-svg2png');
grunt.registerTask('default', ['svg2png']); grunt.registerTask('default', ['svg2png']);
} }

26
src/searchengine/nova3/socks.py

@ -14,7 +14,7 @@ are permitted provided that the following conditions are met:
3. Neither the name of Dan Haim nor the names of his contributors may be used 3. Neither the name of Dan Haim nor the names of his contributors may be used
to endorse or promote products derived from this software without specific to endorse or promote products derived from this software without specific
prior written permission. prior written permission.
THIS SOFTWARE IS PROVIDED BY DAN HAIM "AS IS" AND ANY EXPRESS OR IMPLIED THIS SOFTWARE IS PROVIDED BY DAN HAIM "AS IS" AND ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
@ -114,15 +114,15 @@ def setdefaultproxy(proxytype=None,addr=None,port=None,rdns=True,username=None,p
""" """
global _defaultproxy global _defaultproxy
_defaultproxy = (proxytype,addr,port,rdns,username,password) _defaultproxy = (proxytype,addr,port,rdns,username,password)
class socksocket(socket.socket): class socksocket(socket.socket):
"""socksocket([family[, type[, proto]]]) -> socket object """socksocket([family[, type[, proto]]]) -> socket object
Open a SOCKS enabled socket. The parameters are the same as Open a SOCKS enabled socket. The parameters are the same as
those of the standard socket init. In order for SOCKS to work, those of the standard socket init. In order for SOCKS to work,
you must specify family=AF_INET, type=SOCK_STREAM and proto=0. you must specify family=AF_INET, type=SOCK_STREAM and proto=0.
""" """
def __init__(self, family=socket.AF_INET, type=socket.SOCK_STREAM, proto=0, _sock=None): def __init__(self, family=socket.AF_INET, type=socket.SOCK_STREAM, proto=0, _sock=None):
_orgsocket.__init__(self,family,type,proto,_sock) _orgsocket.__init__(self,family,type,proto,_sock)
if _defaultproxy != None: if _defaultproxy != None:
@ -131,7 +131,7 @@ class socksocket(socket.socket):
self.__proxy = (None, None, None, None, None, None) self.__proxy = (None, None, None, None, None, None)
self.__proxysockname = None self.__proxysockname = None
self.__proxypeername = None self.__proxypeername = None
def __recvall(self, bytes): def __recvall(self, bytes):
"""__recvall(bytes) -> data """__recvall(bytes) -> data
Receive EXACTLY the number of bytes requested from the socket. Receive EXACTLY the number of bytes requested from the socket.
@ -144,7 +144,7 @@ class socksocket(socket.socket):
raise GeneralProxyError("connection closed unexpectedly") raise GeneralProxyError("connection closed unexpectedly")
data = data + d data = data + d
return data return data
def setproxy(self,proxytype=None,addr=None,port=None,rdns=True,username=None,password=None): def setproxy(self,proxytype=None,addr=None,port=None,rdns=True,username=None,password=None):
"""setproxy(proxytype, addr[, port[, rdns[, username[, password]]]]) """setproxy(proxytype, addr[, port[, rdns[, username[, password]]]])
Sets the proxy to be used. Sets the proxy to be used.
@ -163,7 +163,7 @@ class socksocket(socket.socket):
Only relevant when username is also provided. Only relevant when username is also provided.
""" """
self.__proxy = (proxytype,addr,port,rdns,username,password) self.__proxy = (proxytype,addr,port,rdns,username,password)
def __negotiatesocks5(self,destaddr,destport): def __negotiatesocks5(self,destaddr,destport):
"""__negotiatesocks5(self,destaddr,destport) """__negotiatesocks5(self,destaddr,destport)
Negotiates a connection through a SOCKS5 server. Negotiates a connection through a SOCKS5 server.
@ -255,26 +255,26 @@ class socksocket(socket.socket):
self.__proxypeername = (socket.inet_ntoa(ipaddr),destport) self.__proxypeername = (socket.inet_ntoa(ipaddr),destport)
else: else:
self.__proxypeername = (destaddr,destport) self.__proxypeername = (destaddr,destport)
def getproxysockname(self): def getproxysockname(self):
"""getsockname() -> address info """getsockname() -> address info
Returns the bound IP address and port number at the proxy. Returns the bound IP address and port number at the proxy.
""" """
return self.__proxysockname return self.__proxysockname
def getproxypeername(self): def getproxypeername(self):
"""getproxypeername() -> address info """getproxypeername() -> address info
Returns the IP and port number of the proxy. Returns the IP and port number of the proxy.
""" """
return _orgsocket.getpeername(self) return _orgsocket.getpeername(self)
def getpeername(self): def getpeername(self):
"""getpeername() -> address info """getpeername() -> address info
Returns the IP address and port number of the destination Returns the IP address and port number of the destination
machine (note: getproxypeername returns the proxy) machine (note: getproxypeername returns the proxy)
""" """
return self.__proxypeername return self.__proxypeername
def __negotiatesocks4(self,destaddr,destport): def __negotiatesocks4(self,destaddr,destport):
"""__negotiatesocks4(self,destaddr,destport) """__negotiatesocks4(self,destaddr,destport)
Negotiates a connection through a SOCKS4 server. Negotiates a connection through a SOCKS4 server.
@ -322,7 +322,7 @@ class socksocket(socket.socket):
self.__proxypeername = (socket.inet_ntoa(ipaddr),destport) self.__proxypeername = (socket.inet_ntoa(ipaddr),destport)
else: else:
self.__proxypeername = (destaddr,destport) self.__proxypeername = (destaddr,destport)
def __negotiatehttp(self,destaddr,destport): def __negotiatehttp(self,destaddr,destport):
"""__negotiatehttp(self,destaddr,destport) """__negotiatehttp(self,destaddr,destport)
Negotiates a connection through an HTTP server. Negotiates a connection through an HTTP server.
@ -353,7 +353,7 @@ class socksocket(socket.socket):
raise HTTPError((statuscode,statusline[2])) raise HTTPError((statuscode,statusline[2]))
self.__proxysockname = ("0.0.0.0",0) self.__proxysockname = ("0.0.0.0",0)
self.__proxypeername = (addr,destport) self.__proxypeername = (addr,destport)
def connect(self,destpair): def connect(self,destpair):
"""connect(self,despair) """connect(self,despair)
Connects to the specified destination through a proxy. Connects to the specified destination through a proxy.

2
src/webui/api/appcontroller.h

@ -48,7 +48,7 @@ private slots:
void preferencesAction(); void preferencesAction();
void setPreferencesAction(); void setPreferencesAction();
void defaultSavePathAction(); void defaultSavePathAction();
void networkInterfaceListAction(); void networkInterfaceListAction();
void networkInterfaceAddressListAction(); void networkInterfaceAddressListAction();
}; };

16
src/webui/www/tstool.py

@ -26,7 +26,7 @@
# modify file(s), you may extend this exception to your version of the file(s), # modify file(s), you may extend this exception to your version of the file(s),
# but you are not obligated to do so. If you do not wish to do so, delete this # but you are not obligated to do so. If you do not wish to do so, delete this
# exception statement from your version. # exception statement from your version.
import argparse import argparse
import copy import copy
import os import os
@ -62,7 +62,7 @@ def processTranslation(filename, sources):
except Exception: except Exception:
print('\tFailed to parse %s!' % (os.path.normpath(filename))) print('\tFailed to parse %s!' % (os.path.normpath(filename)))
return return
root = tree.getroot() root = tree.getroot()
for context in root.findall('context'): for context in root.findall('context'):
context_name = context.find('name').text context_name = context.find('name').text
@ -70,16 +70,16 @@ def processTranslation(filename, sources):
if not has_context and no_obsolete: if not has_context and no_obsolete:
root.remove(context) root.remove(context)
continue continue
for message in context.findall('message'): for message in context.findall('message'):
for location in message.findall('location'): for location in message.findall('location'):
message.remove(location) message.remove(location)
source = message.find('source').text source = message.find('source').text
translation = message.find('translation') translation = message.find('translation')
if has_context and source in sources[context_name]: if has_context and source in sources[context_name]:
sources[context_name].remove(source) sources[context_name].remove(source)
trtype = translation.attrib.get('type') trtype = translation.attrib.get('type')
if (trtype == 'obsolete') or (trtype == 'vanished'): if (trtype == 'obsolete') or (trtype == 'vanished'):
del translation.attrib['type'] # i.e. finished del translation.attrib['type'] # i.e. finished
@ -107,7 +107,7 @@ def processTranslation(filename, sources):
for source in sources[context_name]: for source in sources[context_name]:
message = ET.SubElement(context, 'message') message = ET.SubElement(context, 'message')
ET.SubElement(message, 'source').text = source ET.SubElement(message, 'source').text = source
ET.SubElement(message, 'translation', {'type': 'unfinished'}) ET.SubElement(message, 'translation', {'type': 'unfinished'})
# prettify output xml # prettify output xml
indent = ' ' * 4 indent = ' ' * 4
@ -118,13 +118,13 @@ def processTranslation(filename, sources):
context.find('./name').tail = '\n' + indent context.find('./name').tail = '\n' + indent
messages = context.findall('./message') messages = context.findall('./message')
if len(messages) == 0: continue if len(messages) == 0: continue
for message in messages: for message in messages:
message.text = '\n' + (indent * 2) message.text = '\n' + (indent * 2)
message.tail = '\n' + indent message.tail = '\n' + indent
elems = message.findall('./') elems = message.findall('./')
if len(elems) == 0: continue if len(elems) == 0: continue
for elem in elems: for elem in elems:
elem.tail = '\n' + (indent * 2) elem.tail = '\n' + (indent * 2)
elems[-1:][0].tail = '\n' + indent elems[-1:][0].tail = '\n' + indent

Loading…
Cancel
Save