]> 4ch.mooo.com Git - bakadb.git/commitdiff
Merge branch 'master' of ssh://4ch.mooo.com:26/var/www/16/bakadb master
authorroe <roe@Eleanor>
Sat, 26 Mar 2016 17:38:42 +0000 (12:38 -0500)
committerroe <roe@Eleanor>
Sat, 26 Mar 2016 17:38:42 +0000 (12:38 -0500)
.gitignore
awoo.sh
bakadb.c
bakadb.h
boop.sh
done [new file with mode: 0755]
price [new file with mode: 0755]
wr [new file with mode: 0755]
x.sh [new file with mode: 0755]

index 6ba73f4de3ee710e192e78c91553af7c0378e002..7345f26390b9862ed40acb935c2c290b35350814 100644 (file)
@@ -2,11 +2,11 @@
 # Ignore (generated) html files,\r
 *.html\r
 *.htm\r
-*.sh\r
 !proj16.bfproject\r
 *.obj\r
 *.OBJ\r
 *.[O]\r
+*.BCO\r
 *.*~\r
 FUCK\r
 *.err\r
@@ -17,14 +17,14 @@ makefile~
 README~\r
 TODO~\r
 LICENCE~\r
-!boop.sh\r
-!awoo.sh\r
-!lowcase.sh\r
-!wmakegnu.sh\r
+*.map\r
+#*.MAP\r
+!modex.lib\r
 img\r
 !.git/config\r
-\r
+!.gitmodules\r
 # except foo.html which is maintained by hand.\r
 #!foo.html\r
 # Ignore objects and archives.\r
 *.[oa]\r
+\r
diff --git a/awoo.sh b/awoo.sh
index 9e26c560dbbd41830da5d0e8d28897f8eb408b03..bf9ffa3eb6181ed625c9df14abc2dbd2fe0b2586 100755 (executable)
--- a/awoo.sh
+++ b/awoo.sh
@@ -1,3 +1,16 @@
 #!/bin/bash
+if [ -z "$*" ]; then
+               pee="wwww"
+       else
+               pee="$*"
+fi
+##echo "$pee"
 git add .
-bash ./boop.sh
+. ./boop.sh "$pee"
+#cp -fp *.exe /var/www/
+#scp -rp -P 26 *.exe 4ch.mooo.com:/var/www/16/
+#if [ -f "*.exe" ]
+#      then
+#zip /var/www/scroll scroll.exe
+#zip /var/www/exmmtest exmmtest.exe
+#fi
index ffdd913877746b05c8efa09602beb6993d8fc578..4b14bce3582c9c9f189205d078465b989ceb639d 100755 (executable)
--- a/bakadb.c
+++ b/bakadb.c
@@ -39,10 +39,13 @@ byte *bakapee = NULL;
 iword found_id=0;
 
 
-iword baka_id;              //work order numer
-byte baka_name[64];     //name of client
-byte baka_phone[64];     //name of client
-byte baka_address[64];     //name of client
+iword baka_id;              //work order number
+iword bakacust_id;              //customer id
+byte bakacust_lastname[64];     //name of client
+byte bakacust_firstname[64];     //name of client
+byte bakacust_phone[64];     //phopne number of client
+byte bakacust_address[64];     //address of client
+byte bakacust_zipcode[64];     //zipcode
 byte baka_desc[4096];     //Description of the problem
 time_t                         baka_date;
 byte baka_price;                       //price
@@ -54,17 +57,19 @@ word baka_done;                     //is it done?
 
 void bdwr(void)
 {
-       byte str[BAKAPEE], buff[BAKAPEE], st[24];
+       byte str[BAKAPEE], strc[BAKAPEE], buff[BAKAPEE], st[24];
        byte *pc = NULL;
        byte *p;
 
-       FILE *in = fopen ( "baka.db", "r+" );
-       FILE *out = NULL;
-       if(in == NULL)
+       FILE *inbaka = fopen ( BAKADB, "r+" );
+       FILE *outbaka = NULL;
+       FILE *incust = fopen ( CUSTDB, "r+" );
+       FILE *outcust = NULL;
+       if(inbaka == NULL)
        {
                newdb:
-               fclose(in);
-               out = fopen ( "baka.db", "w+" );
+               fclose(inbaka);
+               outbaka = fopen ( BAKADB, "w+" );
                printf("\nNew database being made ^^;\n");
                printf("Work order number: ");
                scanf("%ud\n", &baka_id);   // input~
@@ -72,36 +77,45 @@ void bdwr(void)
        }
        else
        {
-               fgets(buff, 1, in);
+               fgets(buff, 1, inbaka);
                if(buff==NULL)
                {
-                       unlink("baka.db");
+                       unlink(BAKADB);
                        goto newdb;
                }
-               while ( fgets ( buff, sizeof buff, in ) != NULL );
-               fclose(in);
+               while ( fgets ( buff, sizeof buff, inbaka) != NULL );
+               fclose(inbaka);
                pc = strtok(buff, SEPE);
                baka_id = atoi(pc);
                baka_id++;
-               out = fopen ( "baka.db", "a+" );
+               outbaka = fopen ( BAKADB, "a+" );
+               outcust = fopen ( CUSTDB, "a+" );
                //printf("      baka_id=%u\n", baka_id);
        }
        sprintf(st, "%u", baka_id);
        strcpy(str, st);
        strcat(str,SEPE);
 
-       printf("Client's name: ");
-       scanf("%s", &(baka_name));     // input~
+       strcpy(str, st);
+       strcat(strc,SEPE);
+
+       //input 1st and last~
+       printf("Client's name Last Name: ");
+       scanf("%s", &(bakacust_lastname));     // input~
+       printf("Client's name First Name: ");
+       scanf("%s", &(bakacust_firstname));     // input~
 
        //TODO make uppercased names
        found_id=0;
-       cmpstrfromdb(1);
+       cmpstrfromdb(1);        //++++update
 
-       strcat(str,baka_name);  strcat(str,SEPE);
+       strcat(str,bakacust_lastname);  strcat(str,SEPE);
+       strcat(str,bakacust_lastname);  strcat(str,SEPE);
+       strcat(str,bakacust_lastname);  strcat(str,SEPE);
        if(found_id==0)
        {
                printf("Client's Phone Number: ");
-               scanf("%s", &(baka_phone));     // input~
+               scanf("%s", &(bakacust_phone));     // input~
        }else getstrfromdb(2);
        strcat(str,baka_phone);  strcat(str,SEPE);
        if(found_id==0)
@@ -132,8 +146,8 @@ void bdwr(void)
        strcat(str,SEPE);
        strcat(str,"\n");
        //bdmksheet(&bddb);
-       fwrite(str, strlen(str), 1, out);
-       fclose(out);
+       fwrite(str, strlen(str), 1, outbaka);
+       fclose(outbaka);
        found_id=0;
        free(pc);
 }
@@ -144,7 +158,7 @@ void bddone(iword id)
        byte *p;
        siword eed;
 
-       FILE *in = fopen ( "baka.db", "r" );
+       FILE *in = fopen ( BAKADB, "r" );
        FILE *out = NULL;
        while ( fgets ( buff, sizeof buff, in ) != (NULL) )
        {
@@ -165,7 +179,7 @@ void bddone(iword id)
                }
        }
        fclose(in);
-       out = fopen ( "baka.db", "w+" );
+       out = fopen ( BAKADB, "w+" );
        fwrite(str, strlen(str), 1, out);
        fclose(out);
        free(p);
@@ -178,7 +192,7 @@ void bdchange(iword id, byte i, sword t)
        byte *p;
        siword eed;
 
-       FILE *in = fopen ( "baka.db", "r" );
+       FILE *in = fopen ( BAKADB, "r" );
        FILE *out = NULL;
        dbvar(t);
        found_id=id;
@@ -202,7 +216,7 @@ void bdchange(iword id, byte i, sword t)
                }
        }
        fclose(in);
-       out = fopen ( "baka.db", "w+" );
+       out = fopen ( BAKADB, "w+" );
        fwrite(str, strlen(str), 1, out);
        fclose(out);
        free(p);
@@ -280,7 +294,7 @@ void getstrfromdb(sword i)
 {
        byte buff[BAKAPEE];
        word q;
-       FILE *in = fopen ( "baka.db", "r+" );
+       FILE *in = fopen ( BAKADB, "r+" );
        if(found_id>0) dbvar(i);
        while ( fgets ( buff, sizeof buff, in ) != NULL )
        {
@@ -314,7 +328,7 @@ void cmpstrfromdb(word i)
        byte buff[BAKAPEE];
        byte pee[16];
        word q;
-       FILE *in = fopen ( "baka.db", "r+" );
+       FILE *in = fopen ( BAKADB, "r+" );
        dbvar(i);
        while ( fgets ( buff, sizeof buff, in ) != NULL )
        {
index 31bfbae3f0208ba350178be74a24115199ddd6e8..98e4e5222b5a1d90273200f47be3d7491596d36e 100755 (executable)
--- a/bakadb.h
+++ b/bakadb.h
@@ -20,6 +20,9 @@
  *
  */
 
+#ifndef __BAKADB_H__
+#define __BAKADB_H__
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <errno.h>
 #include <time.h>
 
-#ifndef __BAKADB_H__
-#define __BAKADB_H__
-
 #include "types.h"
 #include "bdb.h"
 
+#define CUSTDB "../../customer.db"
+#define BAKADB "baka.db"
+
 extern iword baka_id;              //work order numer
 extern byte baka_name[64];     //name of client
 extern byte baka_phone[64];     //name of client
diff --git a/boop.sh b/boop.sh
index 322d053f4e1c311e472a50de36843ef8370ad330..64c99908dea66f03ff1a54fb89afc012f19f4a43 100755 (executable)
--- a/boop.sh
+++ b/boop.sh
@@ -1,5 +1,5 @@
 #!/bin/bash
-git commit -a
+git commit -a -m "$1"
 #git push x4 master
 git push origin master
 #git push jp master
diff --git a/done b/done
new file mode 100755 (executable)
index 0000000..7fed450
Binary files /dev/null and b/done differ
diff --git a/price b/price
new file mode 100755 (executable)
index 0000000..99ac5ca
Binary files /dev/null and b/price differ
diff --git a/wr b/wr
new file mode 100755 (executable)
index 0000000..8cffe25
Binary files /dev/null and b/wr differ
diff --git a/x.sh b/x.sh
new file mode 100755 (executable)
index 0000000..1e4be61
--- /dev/null
+++ b/x.sh
@@ -0,0 +1,18 @@
+rm *.o
+rm *.err
+rm *.exe
+rm sheet.txt
+rm done
+rm wr
+rm price
+#rm rd
+wcl386 -zq -c bakadb.c
+wcl386 -zq wr.c bakadb.o
+wcl386 -zq done.c bakadb.o
+wcl386 -zq price.c bakadb.o
+#wcl -sg -ol -ol+ bdrd.c bulldog.o
+./wr
+./done
+./price
+
+cat baka.db