Ignore:
Timestamp:
Nov 2, 2008, 1:21:05 AM (17 years ago)
Author:
bird
Message:

GPLv2 -> GPLv3. See Ticket #44 for clarifications. Fixes #44.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/VSlickMacros/kdev.e

    r1647 r2019  
    11/* $Id$  -*- tab-width: 4 c-indent-level: 4 -*- */
    2 /**
     2/** @file
    33 * Visual SlickEdit Documentation Macros.
    44 */
    55
    66/*
    7  * Copyright (c) 1999-2007 knut st. osmundsen <bird-kBuild-spam@anduin.net>
     7 * Copyright (c) 1999-2008 knut st. osmundsen <bird-src-spam@anduin.net>
    88 *
    9  * This program is free software; you can redistribute it and/or modify
     9 * This file is part of kBuild.
     10 *
     11 * kBuild is free software; you can redistribute it and/or modify
    1012 * it under the terms of the GNU General Public License as published by
    11  * the Free Software Foundation; either version 2 of the License, or
     13 * the Free Software Foundation; either version 3 of the License, or
    1214 * (at your option) any later version.
    1315 *
    14  * This program is distributed in the hope that it will be useful,
     16 * kBuild is distributed in the hope that it will be useful,
    1517 * but WITHOUT ANY WARRANTY; without even the implied warranty of
    1618 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     
    1820 *
    1921 * You should have received a copy of the GNU General Public License
    20  * along with This program; if not, write to the Free Software
    21  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
     22 * along with kBuild.  If not, see <http://www.gnu.org/licenses/>
    2223 *
    2324 */
     
    100101static _str     skCodeStyle     = 'Opt2Ind4'; /* coding style scheme. */
    101102static _str     skDocStyle      = 'javadoc';/* options: javadoc, */
    102 static _str     skLicense       = 'GPL';    /* options: GPL, LGPL, Odin32, Confidential */
     103static _str     skLicense       = 'GPLv3';  /* options: GPL, LGPL, Odin32, Confidential, ++ */
    103104static _str     skCompany       = '';       /* empty or company name for copyright */
    104105static _str     skProgram       = '';       /* Current program name - used by [L]GPL */
     
    12481249    int fSplit = 0;
    12491250
     1251    _insert_text("\n");
     1252    up();
    12501253    _begin_line();
    12511254    k_insert_comment('$':+'I':+'d: $', KIC_CURSOR_AT_END, -1);
     
    12541257
    12551258    k_javadoc_box_start('@file');
    1256     //if (1)
    1257     //{
    1258         fSplit = 1;
    1259         iCursorLine = p_RLine;
    1260         k_javadoc_box_line();
    1261         k_javadoc_box_end();
    1262         _insert_text("\n");
    1263         _insert_text(k_comment() "\n");
    1264     //}
    1265     //else
    1266     //{
    1267     //    k_javadoc_box_line();
    1268     //    iCursorLine = p_RLine;
    1269     //    k_javadoc_box_line();
    1270     //    k_javadoc_box_line();
    1271     //}
     1259    fSplit = 1;
     1260    iCursorLine = p_RLine;
     1261    k_javadoc_box_line();
     1262    k_javadoc_box_end();
     1263    _insert_text("\n");
     1264    _insert_text(k_comment() "\n");
    12721265
    12731266    if (skLicense == 'Confidential')
     
    12911284        k_javadoc_box_line('Copyright (c) ' k_year() ' 'skUserName' <' skUserEmail '>');
    12921285    k_javadoc_box_line();
     1286    _str sProg = skProgram;
    12931287    switch (skLicense)
    12941288    {
     
    12981292
    12991293        case 'GPL':
    1300             _str sProg = skProgram;
    13011294            if (!fSplit)
    13021295                k_javadoc_box_line();
     
    13241317
    13251318        case 'LGPL':
    1326             sProg = skProgram;
    13271319            if (!fSplit)
    13281320                k_javadoc_box_line();
     
    13491341            break;
    13501342
     1343        case 'GPLv3':
     1344            if (!fSplit)
     1345                k_javadoc_box_line();
     1346            if (sProg == '')
     1347                sProg = 'This program';
     1348            else
     1349            {
     1350                k_javadoc_box_line('This file is part of ' sProg '.');
     1351                k_javadoc_box_line();
     1352            }
     1353            k_javadoc_box_line(sProg ' is free software; you can redistribute it and/or modify');
     1354            k_javadoc_box_line('it under the terms of the GNU General Public License as published by');
     1355            k_javadoc_box_line('the Free Software Foundation; either version 3 of the License, or');
     1356            k_javadoc_box_line('(at your option) any later version.');
     1357            k_javadoc_box_line();
     1358            k_javadoc_box_line(sProg ' is distributed in the hope that it will be useful,');
     1359            k_javadoc_box_line('but WITHOUT ANY WARRANTY; without even the implied warranty of');
     1360            k_javadoc_box_line('MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the');
     1361            k_javadoc_box_line('GNU General Public License for more details.');
     1362            k_javadoc_box_line();
     1363            k_javadoc_box_line('You should have received a copy of the GNU General Public License');
     1364            k_javadoc_box_line('along with ' sProg '.  If not, see <http://www.gnu.org/licenses/>');
     1365            break;
     1366
     1367        case 'LGPLv3':
     1368            if (!fSplit)
     1369                k_javadoc_box_line();
     1370            if (sProg == '')
     1371                sProg = 'This program';
     1372            else
     1373            {
     1374                k_javadoc_box_line('This file is part of ' sProg '.');
     1375                k_javadoc_box_line();
     1376            }
     1377            k_javadoc_box_line(sProg ' is free software; you can redistribute it and/or');
     1378            k_javadoc_box_line('modify it under the terms of the GNU Lesser General Public');
     1379            k_javadoc_box_line('License as published by the Free Software Foundation; either');
     1380            k_javadoc_box_line('version 3 of the License, or (at your option) any later version.');
     1381            k_javadoc_box_line();
     1382            k_javadoc_box_line(sProg ' is distributed in the hope that it will be useful,');
     1383            k_javadoc_box_line('but WITHOUT ANY WARRANTY; without even the implied warranty of');
     1384            k_javadoc_box_line('MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the');
     1385            k_javadoc_box_line('GNU Lesser General Public License for more details.');
     1386            k_javadoc_box_line();
     1387            k_javadoc_box_line('You should have received a copy of the GNU Lesser General Public License');
     1388            k_javadoc_box_line('along with ' sProg '.  If not, see <http://www.gnu.org/licenses/>');
     1389            break;
     1390
    13511391        case 'Confidential':
     1392            k_javadoc_box_line('All Rights Reserved');
     1393            break;
     1394
     1395        case 'ConfidentialNoAuthor':
     1396            k_javadoc_box_line(skCompany ' confidential');
    13521397            k_javadoc_box_line('All Rights Reserved');
    13531398            break;
     
    29292974    rc   = _menu_insert(mhLic,   -1, MF_ENABLED | MF_UNCHECKED, "&GPL",                 "k_menu_license GPL",           "GPL");
    29302975    rc   = _menu_insert(mhLic,   -1, MF_ENABLED | MF_UNCHECKED, "&LGPL",                "k_menu_license LGPL",          "LGPL");
     2976    rc   = _menu_insert(mhLic,   -1, MF_ENABLED | MF_UNCHECKED, "&GPLv3",               "k_menu_license GPLv3",         "GPLv3");
     2977    rc   = _menu_insert(mhLic,   -1, MF_ENABLED | MF_UNCHECKED, "&LGPLv3",              "k_menu_license LGPLv3",        "LGPLv3");
    29312978    rc   = _menu_insert(mhLic,   -1, MF_ENABLED | MF_UNCHECKED, "&VirtualBox",          "k_menu_license VirtualBox",    "VirtualBox");
    29322979    rc   = _menu_insert(mhLic,   -1, MF_ENABLED | MF_UNCHECKED, "&VirtualBox GPL And CDDL","k_menu_license VirtualBoxGPLAndCDDL", "VirtualBoxGPLAndCDDL");
    29332980    rc   = _menu_insert(mhLic,   -1, MF_ENABLED | MF_UNCHECKED, "&Confidential",        "k_menu_license Confidential",  "Confidential");
     2981    rc   = _menu_insert(mhLic,   -1, MF_ENABLED | MF_UNCHECKED, "&Confidential No Author", "k_menu_license ConfidentialNoAuthor",  "ConfidentialNoAuthor");
    29342982
    29352983    rc   = _menu_insert(mhkDev,  -1, MF_ENABLED, "-", "", "dash vars");
     
    29422990    rc   = _menu_insert(mhkDev,  -1, MF_ENABLED, "-", "", "dash preset");
    29432991    mhPre= _menu_insert(mhkDev,  -1, MF_SUBMENU, "P&resets", "", "");
    2944     rc   = _menu_insert(mhPre,   -1, MF_ENABLED, "The Bird",    "k_menu_preset javadoc, GPL, Opt2Ind4",                 "bird");
    2945     rc   = _menu_insert(mhPre,   -1, MF_ENABLED, "kLIBC",       "k_menu_preset javadoc, GPL, Opt2Ind4,, kLIBC",         "kLIBC");
    2946     rc   = _menu_insert(mhPre,   -1, MF_ENABLED, "kBuild",      "k_menu_preset javadoc, GPL, Opt2Ind4,, kBuild",        "kBuild");
    2947     rc   = _menu_insert(mhPre,   -1, MF_ENABLED, "kStuff",      "k_menu_preset javadoc, GPL, Opt2Ind4,, kStuff",        "kStuff");
    2948     rc   = _menu_insert(mhPre,   -1, MF_ENABLED, "sun",         "k_menu_preset javadoc, Confidential, Opt2Ind4, sun",   "sun");
    2949     rc   = _menu_insert(mhPre,   -1, MF_ENABLED, "VirtualBox",  "k_menu_preset javadoc, VirtualBox, Opt2Ind4, sun",     "VirtualBox");
     2992    rc   = _menu_insert(mhPre,   -1, MF_ENABLED, "The Bird",    "k_menu_preset javadoc, GPL, Opt2Ind4",                         "bird");
     2993    rc   = _menu_insert(mhPre,   -1, MF_ENABLED, "kLIBC",       "k_menu_preset javadoc, GPL, Opt2Ind4,, kLIBC",                 "kLIBC");
     2994    rc   = _menu_insert(mhPre,   -1, MF_ENABLED, "kBuild",      "k_menu_preset javadoc, GPLv3, Opt2Ind4,, kBuild",              "kBuild");
     2995    rc   = _menu_insert(mhPre,   -1, MF_ENABLED, "kStuff",      "k_menu_preset javadoc, GPL, Opt2Ind4,, kStuff",                "kStuff");
     2996    rc   = _menu_insert(mhPre,   -1, MF_ENABLED, "sun",         "k_menu_preset javadoc, ConfidentialNoAuthor, Opt2Ind4, sun",   "sun");
     2997    rc   = _menu_insert(mhPre,   -1, MF_ENABLED, "VirtualBox",  "k_menu_preset javadoc, VirtualBox, Opt2Ind4, sun",             "VirtualBox");
    29502998
    29512999    k_menu_doc_style();
     
    30533101    _menu_set_state(mhDoc, "javadoc",   MF_UNCHECKED);
    30543102    _menu_set_state(mhDoc, "linux",     MF_UNCHECKED | MF_GRAYED);
     3103
    30553104    _menu_set_state(mhDoc, skDocStyle,  MF_CHECKED);
    30563105}
     
    30683117    _menu_set_state(mhLic, "GPL",           MF_UNCHECKED);
    30693118    _menu_set_state(mhLic, "LGPL",          MF_UNCHECKED);
     3119    _menu_set_state(mhLic, "GPLv3",         MF_UNCHECKED);
     3120    _menu_set_state(mhLic, "LGPLv3",        MF_UNCHECKED);
     3121    _menu_set_state(mhLic, "VirtualBox",    MF_UNCHECKED);
     3122    _menu_set_state(mhLic, "VirtualBoxGPLAndCDDL", MF_UNCHECKED);
    30703123    _menu_set_state(mhLic, "Confidential",  MF_UNCHECKED);
     3124    _menu_set_state(mhLic, "ConfidentialNoAuthor", MF_UNCHECKED);
     3125
    30713126    _menu_set_state(mhLic, skLicense,       MF_CHECKED);
    30723127}
Note: See TracChangeset for help on using the changeset viewer.