]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - doc/html/download.c
Fix that
[xonotic/gmqcc.git] / doc / html / download.c
index 33845a78dbbce19b413d29699d2a0d4c900734f5..f31545c5c535be0855c869db36787b7845d11efd 100644 (file)
@@ -28,7 +28,7 @@ char value(char c) {
 int security_decode(unsigned char *dest, const unsigned char *src, int srclen) {
     unsigned char *p;
 
 int security_decode(unsigned char *dest, const unsigned char *src, int srclen) {
     unsigned char *p;
 
-    if(!*src) 
+    if(!*src)
         return 0;
 
     *dest = 0;
         return 0;
 
     *dest = 0;
@@ -42,11 +42,11 @@ int security_decode(unsigned char *dest, const unsigned char *src, int srclen) {
         if(!isbase64(src[1])) {
             p -= 2;
             break;
         if(!isbase64(src[1])) {
             p -= 2;
             break;
-        } 
+        }
         else if(!isbase64(src[2])) {
             p -= 2;
             break;
         else if(!isbase64(src[2])) {
             p -= 2;
             break;
-        } 
+        }
         else if(!isbase64(src[3])) {
             p--;
             break;
         else if(!isbase64(src[3])) {
             p--;
             break;
@@ -67,13 +67,16 @@ int security_decode(unsigned char *dest, const unsigned char *src, int srclen) {
  * If more platforms are supported add the entries between the start
  * tag here, and the end tag below. Nothing else needs to be done
  * <tag> (the table needs to match the HTML too)
  * If more platforms are supported add the entries between the start
  * tag here, and the end tag below. Nothing else needs to be done
  * <tag> (the table needs to match the HTML too)
- */   
+ */
 #define ARCHLINUX_32_REF "%sgmqcc-%c.%c.%c-1-i686.pkg.tar.xz%s"
 #define ARCHLINUX_64_REF "%sgmqcc-%c.%c.%c-1-x86_64.pkg.tar.xz%s"
 #define DEBIAN_32_REF    "%sgmqcc-%c.%c.%c-i686.deb%s"
 #define DEBIAN_64_REF    "%sgmqcc-%c.%c.%c-x86_64.deb%s"
 #define WINDOWS_32_REF   "%sgmqcc-%c.%c.%c-win32.zip%s"
 #define WINDOWS_64_REF   "%sgmqcc-%c.%c.%c-win64.zip%s"
 #define ARCHLINUX_32_REF "%sgmqcc-%c.%c.%c-1-i686.pkg.tar.xz%s"
 #define ARCHLINUX_64_REF "%sgmqcc-%c.%c.%c-1-x86_64.pkg.tar.xz%s"
 #define DEBIAN_32_REF    "%sgmqcc-%c.%c.%c-i686.deb%s"
 #define DEBIAN_64_REF    "%sgmqcc-%c.%c.%c-x86_64.deb%s"
 #define WINDOWS_32_REF   "%sgmqcc-%c.%c.%c-win32.zip%s"
 #define WINDOWS_64_REF   "%sgmqcc-%c.%c.%c-win64.zip%s"
+#define SLACKWARE_32_REF "%sgmqcc-%c.%c.%c-i686.txz%s"
+#define SLACKWARE_64_REF "%sgmqcc-%c.%c.%c-x86_64.txz%s"
+
 
 #define HTML "\
 <!doctype html>\
 
 #define HTML "\
 <!doctype html>\
@@ -121,6 +124,10 @@ int security_decode(unsigned char *dest, const unsigned char *src, int srclen) {
       <td><a href=\"%s\">Download</a></td>\
       <td><a href=\"%s\">Download</a></td>\
      </tr>\
       <td><a href=\"%s\">Download</a></td>\
       <td><a href=\"%s\">Download</a></td>\
      </tr>\
+     <tr>\
+      <td>Slackware</td>\
+      <td><a href=\"%s\">Download</a></td>\
+      <td><a href=\"%s\">Download</a></td>\
      <tr>\
       <td>Windows</td>\
       <td><a href=\"%s\">Download</a></td>\
      <tr>\
       <td>Windows</td>\
       <td><a href=\"%s\">Download</a></td>\
@@ -140,6 +147,7 @@ int security_decode(unsigned char *dest, const unsigned char *src, int srclen) {
 static char build_table[][4096] = {
     ARCHLINUX_32_REF, ARCHLINUX_64_REF,
     DEBIAN_32_REF,    DEBIAN_64_REF,
 static char build_table[][4096] = {
     ARCHLINUX_32_REF, ARCHLINUX_64_REF,
     DEBIAN_32_REF,    DEBIAN_64_REF,
+    SLACKWARE_32_REF, SLACKWARE_64_REF,
     WINDOWS_32_REF,   WINDOWS_64_REF
 };
 /* </tag> */
     WINDOWS_32_REF,   WINDOWS_64_REF
 };
 /* </tag> */
@@ -155,7 +163,7 @@ void escape(url_t *str) {
     char hexstr[3];
     unsigned int  i=0;
     unsigned long l=0;
     char hexstr[3];
     unsigned int  i=0;
     unsigned long l=0;
+
     p = str->data;
     for(i=0; i < str->len; i++) {
         if((p - str->data) >= str->len)
     p = str->data;
     for(i=0; i < str->len; i++) {
         if((p - str->data) >= str->len)
@@ -227,7 +235,8 @@ void genhtml() {
     fprintf(fp, HTML,
         build_table[0], build_table[1],
         build_table[2], build_table[3],
     fprintf(fp, HTML,
         build_table[0], build_table[1],
         build_table[2], build_table[3],
-        build_table[4], build_table[5]
+        build_table[4], build_table[5],
+        build_table[6], build_table[7]
     );
     fclose (fp);
 }
     );
     fclose (fp);
 }
@@ -235,7 +244,7 @@ void genhtml() {
 /*
  * Builds a list of download links with the right version and handles the
  * rest of the magic.
 /*
  * Builds a list of download links with the right version and handles the
  * rest of the magic.
- */  
+ */
 void build(const char *directory) {
     /* Figure out version number */
     char   find[3];
 void build(const char *directory) {
     /* Figure out version number */
     char   find[3];