free software resistance

 the cost of computing freedom is eternal vigilance

### gw.txt *original date:* feb 2021 *originally posted:* oct 2024 gw.txt: ``` // license: creative commons cc0 1.0 (public domain) // http://creativecommons.org/publicdomain/zero/1.0/ // gemwiki 0.1, feb 2021 mn function parse(s, p, l) { return s.substring(p, p + l); } function right(s, l) { return s.substring(s.length-l, s.length); } function left(s, l) { return s.substring(0, l); } function back(s, l) { return s.substring(0, s.length-l); } function fixlink(s) { flc = s.split(" ") flc[0] = ""; if (flc.join(" ").trim() == "") { return s; } return flc.join(" "); } function linkproc(s) { if (right(s.trim(), 4).toLowerCase() == ".gif" || right(s.trim(), 4).toLowerCase() == ".jpg" || right(s.trim(), 4).toLowerCase() == ".png" || right(s.trim(), 5).toLowerCase() == ".jpeg") { return '' + fixlink(s.trim()) + ''; } return '' + fixlink(s.trim()) + ''; } cc = wiki.innerHTML; c = ""; plen = 0; pre = 0; gpre = 0; gb = 0; gh1 = 0; gh2 = 0; gh3 = 0; firstgp = 0; it = 0; bo = 0; link = 0; linkcopy = ""; caps = 0; nextcap = 0; lit = 0; litcopy = ""; replacing = 0; replacingcopy = ""; replacinglog = ""; intag = 0; inwiki = 0; wikicopy = ""; for(count = 0; count < cc.length; count++){ p = parse(cc, count, 1); plen += 1; if (p == "<" && pre == 0) { intag = 1; } if (p == ">" && pre == 0 && intag == 1) { intag = 0; } if (link == 1) { linkcopy += p; } if (replacing == 1) { replacingcopy += p; } if (inwiki == 1) { wikicopy += p; } if (p == "\n") { if (link == 1) { c = back(c, linkcopy.trim().length) + linkproc(linkcopy.trim()); link = 0; linkcopy = ""; } if (inwiki == 1) { c += '">' + back(wikicopy, 1) + ''; inwiki = 0; wikicopy = ""; } if (gb == 1) { c += ""; gb = 0; } if (gh1 == 1) { c += ""; } if (gh2 == 1) { c += ""; } if (gh3 == 1) { c += ""; } if (plen < 5 && pre == 1 && gpre == 0) { c += ""; pre = 0; } if (firstgp == 1) { firstgp = 0; } else { if (gh1 + gh2 + gh3 == 0) { c += "
"; } } gh1 = 0; gh2 = 0; gh3 = 0; plen = 0 ; } else if (p == "*" && pre == 0 && link == 0 && intag == 0 && lit == 0) { if (bo == 0) { c += "*"; // bo = 1; } else { // c += ""; // bo = 0; } } else if (p == "/" && pre == 0 && link == 0 && intag == 0 && lit == 0 && inwiki == 0 && replacing == 0) { if (it == 0) { c += p; it = 0; } else { // c += ""; it = 0; } } else if (p == "<" && pre == 1) { c += "<"; } else if (p == ">" && pre == 1) { c += ">"; } else { c += p; } if (plen == 6) { if (right(c, 6) == "=> " && pre == 0) { if (link == 0) { c = back(c, 6); link = 1; } } } if (plen == 5) { if (right(c, 5) == "> " && pre == 0) { if (gb == 0) { c = back(c, 5) + '
'; gb = 1; } } } if (plen == 2) { if (right(c, 2) == "# ") { if (gh1 == 0 && pre == 0) { c = back(c, 2) + "

"; gh1 = 1; } } } if (plen == 3) { if (right(c, 3) == "## ") { if (gh2 == 0 && pre == 0) { c = back(c, 3) + "

"; gh2 = 1; } } } if (plen == 4) { if (right(c, 4) == "### ") { if (gh3 == 0 && pre == 0) { c = back(c, 4) + "

"; gh3 = 1; } } } if (plen == 3) { if (right(c, 3) == "```") { if (gpre == 0) { c = back(c, 3) + "
";
                pre = 1; gpre = 1; firstgp = 1;
                
            } else {

                c = back(c, 3) + "
"; // + right(c, 3); pre = 0; gpre = 0; } } } if (plen == 4 && gpre == 0) { if (right(c, 4) == " ") { if (pre == 0) { c = back(c, 4) + "
";
            } else {
                c = back(c, 4) + "";
                }
            pre = 1;

        } else {

            if (pre == 1 && gpre == 0) {
                c = back(c, 4) + "
" + right(c, 4); } pre = 0; } } if (intag == 0 && inwiki == 0 && pre == 0 && right(c, 7) == " => ") { if (inwiki == 0) { c = back(c, 7) + ' ' + back(wikicopy, 1) + ' '; inwiki = 0; wikicopy = ""; } } var rf = "" ; rf = window.location.href.split('/')[window.location.href.split('/').length - 1].split('.html')[0] ; if (intag == 0 && pre == 0 && right(c, 16) == "[generate-title]") { if (link == 0) { c = back(c, 16) + rf ; } } } wiki.innerHTML=c; ``` license: 0-clause bsd ``` # 2021 mn # # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted. # # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ``` => https://freesoftwareresistance.neocities.org