Implemented bbs view archive/textfile

This commit is contained in:
Michiel Broek 2003-04-12 11:12:26 +00:00
parent cad87472f1
commit b3b4b5dcb5
18 changed files with 557 additions and 346 deletions

View File

@ -7,6 +7,23 @@ $Id$
v0.37.3 09-Apr-2003. v0.37.3 09-Apr-2003.
upgrade:
Remove ~/etc/archiver.data, start mbsetup menu 3, leave and
save. This updates the archiver view contents commands.
mbsetup:
The edit archiver has now an edit line for the view archive
commands.
mbsebbs:
Fixed recognition of tar.gz files.
Added menu function display file.
Display ascii textfiles now uses the More Y/n/= prompt.
lang:
New language prompt number 17.
Erased language prompts 18..36.
v0.37.2 23-Feb-2003 - 09-Apr-2003 v0.37.2 23-Feb-2003 - 09-Apr-2003

4
TODO
View File

@ -1,6 +1,6 @@
$Id$ $Id$
MBSE BBS V0.37.01 TODO list. MBSE BBS V0.37.03 TODO list.
---------------------------- ----------------------------
These are a list of things that must be implemented one way or These are a list of things that must be implemented one way or
@ -24,8 +24,6 @@ libdiesel.a:
mbsebbs: mbsebbs:
N: Implement session and time/day limits. N: Implement session and time/day limits.
N: Display archives.
L: Better word wrapping or paragraph justification in editor. L: Better word wrapping or paragraph justification in editor.
L: E-mail downloads with e-mail verification. L: E-mail downloads with e-mail verification.

View File

@ -15,7 +15,7 @@
14 mail.c |You are not allowed to delete that message 14 mail.c |You are not allowed to delete that message
15 change.c |Offline Reader: Extended Info turned ON 15 change.c |Offline Reader: Extended Info turned ON
16 change.c |Offline Reader: Extended Info turned OFF 16 change.c |Offline Reader: Extended Info turned OFF
17 .c | 17 file.c |This is not a plain textfile.
18 .c | 18 .c |
19 .c | 19 .c |
20 .c | 20 .c |
@ -59,7 +59,7 @@
58 newuser.c |Please enter the correct date format 58 newuser.c |Please enter the correct date format
59 chat.c |*** Sysop is starting chat *** 59 chat.c |*** Sysop is starting chat ***
60 chat.c |*** Sysop has terminated chat *** 60 chat.c |*** Sysop has terminated chat ***
61 mail.c misc.c YN=|More (Y/n/=) 61 mail.c misc.c file.c YN=|More (Y/n/=)
62 newuser.c YN|Would you like Hot-Keyed menus? [Y/n]: 62 newuser.c YN|Would you like Hot-Keyed menus? [Y/n]:
63 newuser.c |Please answer Y or N 63 newuser.c |Please answer Y or N
64 change.c |Please enter your Screen Length? [24]: 64 change.c |Please enter your Screen Length? [24]:
@ -84,27 +84,27 @@
83 change.c |Please enter the correct date format 83 change.c |Please enter the correct date format
84 misc.c |Todays Callers to 84 misc.c |Todays Callers to
85 misc.c |# User Name Device TimeOn Calls Location 85 misc.c |# User Name Device TimeOn Calls Location
86 safe.c |Safe Cracker Door 86 .c |
87 safe.c |Please press a key to continue: 87 .c |
88 safe.c |In the safe lies ... 88 .c |
89 safe.c |Please enter three numbers consisting from 1 to 89 .c |
90 safe.c |Please enter three combinations. 90 .c |
91 safe.c |1st digit: 91 .c |
92 safe.c |Please try again! You must input a number greater than Zero and less than 92 .c |
93 safe.c |2nd digit: 93 .c |
94 safe.c |3rd digit: 94 .c |
95 safe.c | Left: 95 .c |
96 safe.c |Right: 96 .c |
97 safe.c YN|Attempt to open safe with this combination [Y/n]: 97 .c |
98 safe.c |You have won the following... 98 .c |
99 safe.c |Sorry - You didn't open the safe! 99 .c |
100 safe.c |The safe code was: 100 .c |
101 safe.c YN|Do you want to try again ? [Y/n]: 101 .c |
102 safe.c YN|Do you want to open the safe ? [Y/n]: 102 .c |
103 safe.c |THE SAFE IS CURRENTLY LOCKED 103 .c |
104 safe.c |has cracked the safe. 104 .c |
105 safe.c |The safe will remain locked until the sysop rewards the user. 105 .c |
106 safe.c |Maximum trys per day Exceeded! 106 .c |
107 signature.c |Edit message signature 107 signature.c |Edit message signature
108 .c |The FROM, TO and SUBJECT fields are optional. 108 .c |The FROM, TO and SUBJECT fields are optional.
109 .c | From: 109 .c | From:
@ -440,7 +440,7 @@
439 offline.c |Offline Reader Upload 439 offline.c |Offline Reader Upload
440 offline.c |Invalid packet received 440 offline.c |Invalid packet received
441 offline.c |Unknown compression type 441 offline.c |Unknown compression type
442 offline.c |Archiver not available 442 offline.c file.c |Archiver not available
443 offline.c |Unknown type mailpacket 443 offline.c |Unknown type mailpacket
444 offline.c |BlueWave Offline download 444 offline.c |BlueWave Offline download
445 offline.c |Preparing packet 445 offline.c |Preparing packet

View File

@ -15,26 +15,26 @@ HR|Exporteer naar (H)ome of (R)egels directory:
|Je mag dit bericht niet verwijderen |Je mag dit bericht niet verwijderen
|Offline Reader: Uitgebreide Informatie is nu AAN |Offline Reader: Uitgebreide Informatie is nu AAN
|Offline Reader: Uitgebreide Informatie is nu UIT |Offline Reader: Uitgebreide Informatie is nu UIT
|Tijd opgenomen vandaag |Dit is geen normaal tekst bestand
|Bytes opgenomen vandaag |
SOE|(S)torten, (O)pnemen, (E)inde: |
|Bank > |
TBE|(T)ijd, (B)ytes, (E)inde: |
|U moet minstens 5 minuten tijd over hebben om te storten |
|Hoeveel tijd. Aantal minuten beschikbaars is |
|U heeft geprobeerd meer dan de dagelijkse limiet te storten. |
|Maximaal aantal te storten minuten per dag: |
|U heeft Uw rekening balans overschreden. |
|Maximaal aantal minuten op de bankrekening is: |
|U mag storten: |
|U heeft geprobeerd meer dan de dagelijkse limiet op te nemen. |
|Maximaal per dag op te nemen: |
|U heeft geprobeert meer tijd op te nemen dan op de rekening staat. |
|Huidige bank balans: |
|Maximaal aantal kilobytes te storten per dag: |
|U heeft Uw bank balans overschreden. |
|Maximaal aantal kilobytes op de bankrekening is: |
|Hoeveel kilobytes. Aantal Kilobytes beschikbaar is |
|MBSE Bulletin Board Systeem - NIEUWE GEBRUIKER REGISTRATIE |MBSE Bulletin Board Systeem - NIEUWE GEBRUIKER REGISTRATIE
|Gebruik deze naam: |Gebruik deze naam:
|Geef een nieuw wachtwoord : |Geef een nieuw wachtwoord :

View File

@ -15,26 +15,26 @@ HR|Export to (H)ome or (R)ules directory:
|You are not allowed to delete that message |You are not allowed to delete that message
|Offline Reader: Extended Info turned ON |Offline Reader: Extended Info turned ON
|Offline Reader: Extended Info turned OFF |Offline Reader: Extended Info turned OFF
|Time withdrawn today |This is not a plain textfile.
|Bytes withdrawn today |
DWQ|(D)eposit, (W)ithdraw, (Q)uit: |
|Bank > |
TBQ|(T)ime, (B)ytes, (Q)uit : |
|You must have at least 5 minutes remaining to deposit |
|How much time. Minutes available to you is |
|You have tried to deposit more than the maximum limit today. |
|Maximum allowed minutes to deposit per day: |
|You have exeeded your account balance. |
|Maximum allowable minutes in bank account is: |
|You are allowed to deposit: |
|You have tried to withdraw more than the maximum limit today. |
|Maximum allowed to withdraw per day: |
|You have tried to withdraw more time than is in your bank account. |
|Current bank balance: |
|Maximum allowed kilobytes to deposit per day: |
|You have exeeded your account balance. |
|Maximum allowable kilobytes in bank account is: |
|How many kilobytes. KBytes available to you is |
|MBSE Bulletin Board System - NEW USER REGISTRATION |MBSE Bulletin Board System - NEW USER REGISTRATION
|Use this name: |Use this name:
|Please enter new password : |Please enter new password :

View File

@ -15,26 +15,26 @@ HR|Exportar
|No podes borrar esta mensaxe. |No podes borrar esta mensaxe.
|Lector Offline: Informaci¢n extendida ACTIVADA |Lector Offline: Informaci¢n extendida ACTIVADA
|Lector Offline: Informaci¢n extendida DESACTIVADA |Lector Offline: Informaci¢n extendida DESACTIVADA
|Tempo retirado hoxe : |This is not a plain textfile.
|Bytes retirados hoxe : |
DRS|(D)epositar, (R)etirar, (S)air : |
|Banco > |
TBS|(T)empo, (B)ytes, (S)air : |
|Debes ter polo menos 5 minutos para poder depositar |
|¨Canto tempo?. Dispo¤ible en minutos : |
|Tentaches depositar m is do m ximo permitido para hoxe. |
|M ximo tempo diario que se pode depositar: |
|Excedeche-lo saldo da tua conta. |
|Minutos dispo¤ibles na tua conta : |
|Perm¡techese depositar: |
|Tentaches retirar m is do l¡mite m ximo diario. |
|M ximo permitido diario para retirar: |
|Tentaches retirar m is tempo do que tes na tua conta. |
|O saldo da tua conta : |
|M ximo de Kb que se permite depositar diariamente: |
|Excedeche-lo saldo da tua conta. |
|Kilobytes dispo¤ible na tua conta : |
|¨Cantos kilobytes. Podes dispo¤er de |
|MBSE BBS - REXISTRO DE NOVO USUARIO |MBSE BBS - REXISTRO DE NOVO USUARIO
|Use este nome: |Use este nome:
|Por favor teclee o novo password : |Por favor teclee o novo password :

View File

@ -15,26 +15,26 @@ HR|Export in (H)ome oder (R)ules Direktorie:
|Keine Berechtigung zum loeschen der Message |Keine Berechtigung zum loeschen der Message
|Offline Reader: Extended Info turned ON |Offline Reader: Extended Info turned ON
|Offline Reader: Extended Info turned OFF |Offline Reader: Extended Info turned OFF
|Heute abgehobene Zeit . . . . . . : |This is not a plain textfile.
|Heute abgehobene KBytes . . . . . : |
SAE|(S)paren, (A)bheben, (E)nde: |
|Bank > |
ZKE|(Z)eit, (K)Bytes, (E)nde : |
|Zum Sparen muessen Sie mindestens 5 Minuten uebrig haben |
|Wieviel Zeit? Verfuegbare Minuten fuer Sie: |
|Sie versuchten mehr als das maximale Limit fuer heute zu sparen. |
|Maximal zu sparende Minuten pro Tag: |
|Sie haben Ihr Konto ueberzogen. |
|Die maximal verfuegbaren Minuten auf dem Konto sind: |
|Sie koennen sparen: |
|Sie versuchten mehr als das maximale Limit fuer heute abzuheben. |
|Maximum pro Tag abzuheben: |
|Sie versuchten Ihr Zeitkonto zu ueberziehen. |
|Aktueller Kontostand: |
|Maximal zu sparende Kilobytes pro Tag: |
|Sie haben Ihr Konto ueberzogen. |
|Die maximal verfuegbaren Kilobytes auf dem Konto sind: |
|Wieviele Kilobytes? Verfuegbare KBytes fuer Sie sind: |
|MBSE Bulletin Board System - Anlegen eines neuen Benutzerkontos |MBSE Bulletin Board System - Anlegen eines neuen Benutzerkontos
|Diesen Namen verwenden: |Diesen Namen verwenden:
|Bitte das neue Passwort eingeben : |Bitte das neue Passwort eingeben :

View File

@ -15,26 +15,26 @@ HR|Export to (H)ome or (R)ules directory:
|You are not allowed to delete that message |You are not allowed to delete that message
|Offline Reader: Extended Info turned ON |Offline Reader: Extended Info turned ON
|Offline Reader: Extended Info turned OFF |Offline Reader: Extended Info turned OFF
|Tempo prelevato oggi : |This is not a plain textfile.
|Byte prelevati oggi : |
DPE|(D)eposita, (P)releva, (E)sci: |
|Banca > |
TBE|(T)empo, (B)yte, (E)sci : |
|Devi avere almeno 5 minuti restanti per poter depositare |
|Scegli la quantita di tempo. Hai a disposizione minuti |
|Hai cercato di depositare piu del limite massimo oggi. |
|Massimo numero di minuti che puoi depositare ogni giorno: |
|Hai superato il limite per il tuo account. |
|Massimo numero di minuti disponibili nel tuo account: |
|Puoi depositare: |
|Hai cercato di prelevare piu del limite massimo oggi. |
|Massimo numero di minuti che puoi prelevare ogni giorno: |
|You have tried to withdraw more time than is in your bank account. |
|Stato attuale del tuo account: |
|Numero massimo di KB che puoi depositare ogni giorno: |
|Hai superato il limite per il tuo account. |
|Numero massimo di KB che puoi tenere nel tuo account: |
|Scegli la quantita di KB. KB disponibili: |
|MBSE Bulletin Board System - REGISTRAZIONE DEI NUOVI UTENTI |MBSE Bulletin Board System - REGISTRAZIONE DEI NUOVI UTENTI
|Usa questo nome: |Usa questo nome:
|Inserisci una nuova password: |Inserisci una nuova password:

View File

@ -15,26 +15,26 @@ PR|Exportar al directorio (P)ersonal o de (R)eglas:
|No puedes borrar este Mensaje. |No puedes borrar este Mensaje.
|Lector Offline: Informaci¢n extendida ACTIVADA |Lector Offline: Informaci¢n extendida ACTIVADA
|Lector Offline: Informaci¢n extendida DESACTIVADA |Lector Offline: Informaci¢n extendida DESACTIVADA
|Tiempo retirado hoy : |This is not a plain textfile.
|Bytes retirados hoy : |
DRS|(D)epositar, (R)etirar, (S)alir : |
|Banco > |
TBS|(T)iempo, (B)ytes, (S)alir : |
|Debes tener al menos 5 minutos para poder depositar |
|¨Cuanto tiempo?. Disponible en minutos : |
|Has intentado depositar mas del m ximo permitido para hoy. |
|M ximo tiempo diario que se puede depositar: |
|Has excedido el saldo de tu cuenta. |
|Minutos disponibles en tu cuenta : |
|Se te permite depositar: |
|Has intentado retirar m s del l¡mite m ximo diario. |
|M ximo permitido diario para retirar: |
|Has intentado retirar m s tiempo del que tienes en tu cuenta. |
|El saldo de tu cuenta es : |
|M ximo de Kb permitido depositar diariamente: |
|Has excedido el saldo de tu cuenta. |
|Kilobytes disponible en tu cuenta : |
|¨Cuantos kilobytes. Dispones de |
|MBSEBBS - REGISTRO DE NUEVO USUARIO |MBSEBBS - REGISTRO DE NUEVO USUARIO
|Use este nombre: |Use este nombre:
|Por favor teclee el nuevo password : |Por favor teclee el nuevo password :

View File

@ -8,7 +8,7 @@ CLCOMM_SRCS = clcomm.c client.c crc.c semafore.c signame.c
CLCOMM_OBJS = clcomm.o client.o crc.o semafore.o signame.o CLCOMM_OBJS = clcomm.o client.o crc.o semafore.o signame.o
CLCOMM_HDRS = clcomm.h CLCOMM_HDRS = clcomm.h
COMMON_SRCS = attach.c falists.c hdr.c parsedate.c rfcmsg.c unpacker.c \ COMMON_SRCS = attach.c falists.c hdr.c parsedate.c rfcmsg.c unpacker.c \
batchrd.c charset.c ftn.c pktname.c mangle.c sectest.c \ batchrd.c ftn.c pktname.c mangle.c sectest.c \
dostran.c ftnmsg.c mbfile.c nodelock.c rawio.c strcasestr.c \ dostran.c ftnmsg.c mbfile.c nodelock.c rawio.c strcasestr.c \
execute.c expipe.c getheader.c noderecord.c rfcaddr.c strutil.c \ execute.c expipe.c getheader.c noderecord.c rfcaddr.c strutil.c \
faddr.c gmtoffset.c packet.c rfcdate.c term.c endian.c faddr.c gmtoffset.c packet.c rfcdate.c term.c endian.c
@ -136,7 +136,6 @@ parsedate.o: ../config.h libs.h memwatch.h structs.h common.h
rfcmsg.o: ../config.h libs.h memwatch.h structs.h users.h records.h common.h clcomm.h rfcmsg.o: ../config.h libs.h memwatch.h structs.h users.h records.h common.h clcomm.h
unpacker.o: ../config.h libs.h memwatch.h structs.h users.h records.h clcomm.h common.h unpacker.o: ../config.h libs.h memwatch.h structs.h users.h records.h clcomm.h common.h
batchrd.o: ../config.h libs.h memwatch.h structs.h clcomm.h common.h batchrd.o: ../config.h libs.h memwatch.h structs.h clcomm.h common.h
charset.o:
ftn.o: ../config.h libs.h memwatch.h structs.h users.h records.h clcomm.h dbftn.h common.h ftn.o: ../config.h libs.h memwatch.h structs.h users.h records.h clcomm.h dbftn.h common.h
pktname.o: ../config.h libs.h memwatch.h structs.h users.h records.h clcomm.h common.h pktname.o: ../config.h libs.h memwatch.h structs.h users.h records.h clcomm.h common.h
mangle.o: ../config.h libs.h memwatch.h structs.h clcomm.h common.h mangle.o: ../config.h libs.h memwatch.h structs.h clcomm.h common.h

View File

@ -1008,6 +1008,7 @@ struct _archiver {
char funarc[65]; /* Unarc files */ char funarc[65]; /* Unarc files */
char munarc[65]; /* Unarc mail */ char munarc[65]; /* Unarc mail */
char iunarc[65]; /* Unarc FILE_ID.DIZ */ char iunarc[65]; /* Unarc FILE_ID.DIZ */
char varc[65]; /* View archive */
}; };

View File

@ -156,7 +156,7 @@ pop3.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/mbse.h ../lib/structs
lastcallers.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/mbse.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/clcomm.h ../lib/common.h input.h language.h lastcallers.h lastcallers.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/mbse.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/clcomm.h ../lib/common.h input.h language.h lastcallers.h
timeout.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/mbse.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/msg.h timeout.h funcs.h bye.h filesub.h language.h timeout.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/mbse.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/msg.h timeout.h funcs.h bye.h filesub.h language.h
chat.o: ../config.h ../lib/libs.h ../lib/ansi.h ../lib/memwatch.h ../lib/mbse.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/mberrors.h chat.h funcs.h input.h language.h misc.h whoson.h chat.o: ../config.h ../lib/libs.h ../lib/ansi.h ../lib/memwatch.h ../lib/mbse.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/mberrors.h chat.h funcs.h input.h language.h misc.h whoson.h
file.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/mbse.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h filesub.h file.h funcs.h input.h language.h misc.h timeout.h exitinfo.h whoson.h change.h file.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/mbse.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h filesub.h file.h funcs.h input.h language.h misc.h timeout.h exitinfo.h whoson.h change.h dispfile.h
mbstat.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/dbcfg.h ../lib/mberrors.h mbstat.h mbstat.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/dbcfg.h ../lib/mberrors.h mbstat.h
misc.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/mbse.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/clcomm.h ../lib/common.h ../lib/mberrors.h funcs.h input.h language.h misc.h timeout.h exitinfo.h misc.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/mbse.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/clcomm.h ../lib/common.h ../lib/mberrors.h funcs.h input.h language.h misc.h timeout.h exitinfo.h
offline.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/structs.h ../lib/mbse.h ../lib/users.h ../lib/records.h ../lib/bluewave.h ../lib/common.h ../lib/clcomm.h ../lib/msgtext.h ../lib/msg.h mail.h funcs.h input.h language.h file.h filesub.h exitinfo.h timeout.h msgutil.h pop3.h offline.h whoson.h offline.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/structs.h ../lib/mbse.h ../lib/users.h ../lib/records.h ../lib/bluewave.h ../lib/common.h ../lib/clcomm.h ../lib/msgtext.h ../lib/msg.h mail.h funcs.h input.h language.h file.h filesub.h exitinfo.h timeout.h msgutil.h pop3.h offline.h whoson.h
@ -165,7 +165,7 @@ mbnewusr.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/mbse.h ../lib/str
input.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/mbse.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/clcomm.h ../lib/common.h ../lib/mberrors.h input.h timeout.h language.h input.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/mbse.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/clcomm.h ../lib/common.h ../lib/mberrors.h input.h timeout.h language.h
whoson.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/mbse.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h input.h language.h exitinfo.h whoson.h whoson.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/mbse.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h input.h language.h exitinfo.h whoson.h
door.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/mbse.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/mberrors.h input.h timeout.h exitinfo.h whoson.h door.h door.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/mbse.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/mberrors.h input.h timeout.h exitinfo.h whoson.h door.h
dispfile.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/mbse.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/msgtext.h ../lib/msg.h ../lib/clcomm.h funcs.h language.h oneline.h misc.h timeout.h timecheck.h exitinfo.h mail.h email.h input.h dispfile.h dispfile.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/mbse.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/msgtext.h ../lib/msg.h ../lib/clcomm.h funcs.h language.h oneline.h misc.h timeout.h timecheck.h exitinfo.h mail.h email.h input.h dispfile.h filesub.h
userlist.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/mbse.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h userlist.h language.h input.h timeout.h userlist.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/mbse.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h userlist.h language.h input.h timeout.h
timestats.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/mbse.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h timestats.h funcs.h language.h input.h exitinfo.h timestats.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/mbse.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h timestats.h funcs.h language.h input.h exitinfo.h
logentry.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/mbse.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h logentry.h logentry.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/mbse.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h logentry.h

View File

@ -4,7 +4,7 @@
* Purpose ...............: Display ANSI/ASCII textfiles * Purpose ...............: Display ANSI/ASCII textfiles
* *
***************************************************************************** *****************************************************************************
* Copyright (C) 1997-2002 * Copyright (C) 1997-2003
* *
* Michiel Broek FIDO: 2:280/2802 * Michiel Broek FIDO: 2:280/2802
* Beekmansbos 10 * Beekmansbos 10
@ -50,7 +50,7 @@
#include "email.h" #include "email.h"
#include "input.h" #include "input.h"
#include "dispfile.h" #include "dispfile.h"
#include "filesub.h"
@ -162,7 +162,7 @@ int DisplayTextFile(char *filename)
{ {
FILE *fp; FILE *fp;
char *buf; char *buf;
int i, x, c, lc = 0; int i, x, c, z, lc = 0;
if ((fp = fopen(filename, "r")) == NULL) { if ((fp = fopen(filename, "r")) == NULL) {
WriteError("$DisplayTextFile(%s) failed"); WriteError("$DisplayTextFile(%s) failed");
@ -186,9 +186,26 @@ int DisplayTextFile(char *filename)
fflush(stdout); fflush(stdout);
lc++; lc++;
if (lc == exitinfo.iScreenLen) { if ((lc >= exitinfo.iScreenLen) && (lc < 1000)) {
Pause();
lc = 0; lc = 0;
/* More (Y/n/=) */
pout(CFG.MoreF, CFG.MoreB, (char *) Language(61));
fflush(stdout);
alarm_on();
z = toupper(Getone());
if (z == Keystroke(61, 1)) {
printf("\n");
fflush(stdout);
fclose(fp);
free(buf);
return TRUE;
}
if (z == Keystroke(61, 2))
lc = 50000;
Blanker(strlen(Language(61)));
colour(CFG.TextColourF, CFG.TextColourB); colour(CFG.TextColourF, CFG.TextColourB);
} }
} }
@ -198,7 +215,7 @@ int DisplayTextFile(char *filename)
Enter(1); Enter(1);
/* Press ENTER to continue */ /* Press ENTER to continue */
language(LIGHTMAGENTA, BLACK, 436); language(CFG.MoreF, CFG.MoreB, 436);
fflush(stdout); fflush(stdout);
fflush(stdin); fflush(stdin);
alarm_on(); alarm_on();
@ -218,8 +235,7 @@ int DisplayFile(char *filename)
{ {
FILE *pFileName; FILE *pFileName;
long iSec = 0; long iSec = 0;
char *sFileName, *tmp, *tmp1; char *sFileName, *tmp, *tmp1, newfile[PATH_MAX];
char newfile[PATH_MAX];
int i, x; int i, x;
sFileName = calloc(16385, sizeof(char)); sFileName = calloc(16385, sizeof(char));
@ -262,27 +278,22 @@ int DisplayFile(char *filename)
for (x = 0; x < i; x++) { for (x = 0; x < i; x++) {
switch(*(sFileName + x)) { switch(*(sFileName + x)) {
case '': case '': ControlCodeU(sFileName[++x]);
ControlCodeU(sFileName[++x]);
break; break;
case '': case '': ControlCodeF(sFileName[++x]);
ControlCodeF(sFileName[++x]);
break; break;
case ' ': case ' ': ControlCodeK(sFileName[++x]);
ControlCodeK(sFileName[++x]);
break; break;
case '': case '': fflush(stdout);
fflush(stdout);
fflush(stdin); fflush(stdin);
alarm_on(); alarm_on();
Getone(); Getone();
break; break;
case '': case '': /*
/*
* This code will allow you to specify a security level * This code will allow you to specify a security level
* in front of the text, ie ^B32000^Bthis is a test^B * in front of the text, ie ^B32000^Bthis is a test^B
* will print this is a test only if you have security * will print this is a test only if you have security
@ -305,13 +316,11 @@ int DisplayFile(char *filename)
} }
break; break;
case '': case '': fflush(stdout);
fflush(stdout);
sleep(1); sleep(1);
break; break;
default: default: printf("%c", *(sFileName + x));
printf("%c", *(sFileName + x));
} /* switch */ } /* switch */
} /* for */ } /* for */

View File

@ -4,7 +4,7 @@
* Purpose ...............: All the file functions. * Purpose ...............: All the file functions.
* *
***************************************************************************** *****************************************************************************
* Copyright (C) 1997-2002 * Copyright (C) 1997-2003
* *
* Michiel Broek FIDO: 2:280/2802 * Michiel Broek FIDO: 2:280/2802
* Beekmansbos 10 * Beekmansbos 10
@ -47,6 +47,7 @@
#include "exitinfo.h" #include "exitinfo.h"
#include "whoson.h" #include "whoson.h"
#include "change.h" #include "change.h"
#include "dispfile.h"
@ -2214,9 +2215,166 @@ void EditTaglist()
/* /*
* View a file in the current area, menu 103. * View a file in the current area, menu 103.
* If a file name is given, display direct,
* else ask for filename to view.
*/ */
void ViewFile() void ViewFile(char *name)
{ {
char *File, *temp, *arc;
int count, total, rc, found = FALSE;
FILE *fp, *pFile;
Syslog('+', "ViewFile(%s)", printable(name, 0));
if (Access(exitinfo.Security, area.LTSec) == FALSE) {
colour(YELLOW, BLACK);
/* You don't have enough security to list this area */
printf("\n%s\n", (char *) Language(236));
Pause();
return;
}
File = calloc(PATH_MAX, sizeof(char));
if ((name != NULL) && strlen(name)) {
strcpy(File, name);
} else {
Enter(2);
/* Please enter filename: */
pout(YELLOW, BLACK, (char *) Language(245));
colour(CFG.InputColourF, CFG.InputColourB);
GetstrC(File, 80);
if ((strcmp(File, "")) == 0) {
free(File);
return;
}
if (*(File) == '.' || *(File) == '*' || *(File) == ' ' || *(File) == '/') {
colour(CFG.HiliteF, CFG.HiliteB);
/* Illegal Filename! */
printf("\n%s\n\n", (char *) Language(247));
Pause();
free(File);
return;
}
Strlen = strlen(File);
Strlen--;
if (*(File + Strlen) == '.' || *(File + Strlen) == '/' || *(File + Strlen) == ' ') {
colour(CFG.HiliteF, CFG.HiliteB);
/* Illegal Filename! */
printf("\n%s\n\n", (char *) Language(247));
Pause();
free(File);
return;
}
if ((!strcmp(File, "files.bbs")) || (!strcmp(File, "00index")) || (strstr(File, (char *)".html"))) {
colour(CFG.HiliteF, CFG.HiliteB);
/* Illegal Filename! */
printf("\n%s\n\n", (char *) Language(247));
Pause();
free(File);
return;
}
}
/*
* Now check if this file is present
*/
if ((pFile = OpenFileBase(iAreaNumber, FALSE)) == NULL) {
free(File);
return;
}
while (fread(&file, sizeof(file), 1, pFile) == 1) {
if (((strcasecmp(File, file.Name) == 0) || (strcasecmp(File, file.LName) == 0)) && (!file.Deleted) && (!file.Missing)) {
found = TRUE;
break;
}
}
fclose(pFile);
if (!found) {
colour(YELLOW, BLACK);
/* File does not exist, please try again ... */
printf("\n%s\n\n", (char *) Language(296));
free(File);
Pause();
return;
}
sprintf(File, "%s/%s", sAreaPath, file.LName);
arc = GetFileType(File);
Syslog('+', "File to view: %s, type %s", file.LName, printable(arc, 0));
if (arc != NULL) {
found = FALSE;
temp = calloc(PATH_MAX, sizeof(char));
sprintf(temp, "%s/etc/archiver.data", getenv("MBSE_ROOT"));
if ((fp = fopen(temp, "r")) != NULL) {
fread(&archiverhdr, sizeof(archiverhdr), 1, fp);
while (fread(&archiver, archiverhdr.recsize, 1, fp) == 1) {
if ((strcmp(arc, archiver.name) == 0) && (archiver.available)) {
found = TRUE;
break;
}
}
fclose(fp);
}
if (!found || (strlen(archiver.varc) == 0)) {
Syslog('+', "No archiver view for %s available", File);
colour(YELLOW, BLACK);
/* Archiver not available */
printf("\n%s\n\n", Language(442));
free(File);
free(temp);
Pause();
return;
}
/*
* Archiver viewer is available. Make a temp file which we will
* display to the user.
*/
sprintf(temp, "%s/%s/temptxt", CFG.bbs_usersdir, exitinfo.Name);
rc = execute(archiver.varc, File, NULL, (char *)"/dev/null", temp, (char *)"/dev/null");
Syslog('+', "Display temp file %s", temp);
DisplayTextFile(temp);
unlink(temp);
free(temp);
} else {
/*
* Most likely a textfile, first check.
*/
total = count = 0;
if ((fp = fopen(File, "r"))) {
while (TRUE) {
rc = fgetc(fp);
if (rc == EOF)
break;
total++;
if (isascii(rc))
count++;
}
fclose(fp);
}
if (((count * 10) / total) < 8) {
Syslog('+', "This is not a ASCII textfile");
printf("\n%s\n\n", Language(17));
Pause();
free(File);
return;
}
Syslog('+', "Display text file %s", File);
DisplayTextFile(File);
}
free(File);
} }

View File

@ -1,6 +1,7 @@
#ifndef _FILE_H #ifndef _FILE_H
#define _FILE_H #define _FILE_H
/* $Id$ */
void File_RawDir(char *); /* Raw Directory List of a Directory */ void File_RawDir(char *); /* Raw Directory List of a Directory */
void File_List(void); /* List files in current Area */ void File_List(void); /* List files in current Area */
@ -18,7 +19,7 @@ void Delete_Home(void); /* Delete file from home directory */
int Download_Home(void); /* Allows user to download from home dir */ int Download_Home(void); /* Allows user to download from home dir */
int Upload_Home(void); /* Allows user to upload to home directory */ int Upload_Home(void); /* Allows user to upload to home directory */
void Copy_Home(void); /* Copy a file to home directory */ void Copy_Home(void); /* Copy a file to home directory */
void ViewFile(void); /* View a file in the current area. */ void ViewFile(char *); /* View a file in the current area. */
#endif #endif

View File

@ -732,7 +732,7 @@ char *GetFileType(char *fn)
if (memcmp(buf, "MTM", 3) == 0) return (char *)"MTM"; if (memcmp(buf, "MTM", 3) == 0) return (char *)"MTM";
if (memcmp(buf, "#!/bin/", 7) == 0) return (char *)"UNIX script"; if (memcmp(buf, "#!/bin/", 7) == 0) return (char *)"UNIX script";
if (memcmp(buf, "\037\235", 2) == 0) return (char *)"Compressed data"; if (memcmp(buf, "\037\235", 2) == 0) return (char *)"Compressed data";
if (memcmp(buf, "\037\213", 2) == 0) return (char *)"gzip compress"; if (memcmp(buf, "\037\213", 2) == 0) return (char *)"GZIP";
if (memcmp(buf, "\177ELF", 4) == 0) return (char *)"ELF"; if (memcmp(buf, "\177ELF", 4) == 0) return (char *)"ELF";
if (memcmp(buf, "%!", 2) == 0) return (char *)"PostScript"; if (memcmp(buf, "%!", 2) == 0) return (char *)"PostScript";
if (memcmp(buf, "GIF8", 4) == 0) return (char *)"GIF"; if (memcmp(buf, "GIF8", 4) == 0) return (char *)"GIF";

View File

@ -429,7 +429,7 @@ void DoMenu(int Type)
break; break;
case 103: case 103:
ViewFile(); ViewFile(NULL);
break; break;
case 104: case 104:

View File

@ -82,12 +82,14 @@ int CountArchive(void)
archiver.available = TRUE; archiver.available = TRUE;
sprintf(archiver.marc, "%s anw", _PATH_ARC); sprintf(archiver.marc, "%s anw", _PATH_ARC);
sprintf(archiver.tarc, "%s tnw", _PATH_ARC); sprintf(archiver.tarc, "%s tnw", _PATH_ARC);
sprintf(archiver.varc, "%s l", _PATH_ARC);
sprintf(archiver.funarc, "%s xnw", _PATH_ARC); sprintf(archiver.funarc, "%s xnw", _PATH_ARC);
sprintf(archiver.munarc, "%s enw", _PATH_ARC); sprintf(archiver.munarc, "%s enw", _PATH_ARC);
sprintf(archiver.iunarc, "%s enw", _PATH_ARC); sprintf(archiver.iunarc, "%s enw", _PATH_ARC);
} else { } else {
sprintf(archiver.marc, "/usr/bin/arc anw"); sprintf(archiver.marc, "/usr/bin/arc anw");
sprintf(archiver.tarc, "/usr/bin/arc tnw"); sprintf(archiver.tarc, "/usr/bin/arc tnw");
sprintf(archiver.varc, "/usr/bin/arc l");
sprintf(archiver.funarc, "/usr/bin/arc xnw"); sprintf(archiver.funarc, "/usr/bin/arc xnw");
sprintf(archiver.munarc, "/usr/bin/arc enw"); sprintf(archiver.munarc, "/usr/bin/arc enw");
sprintf(archiver.iunarc, "/usr/bin/arc enw"); sprintf(archiver.iunarc, "/usr/bin/arc enw");
@ -99,6 +101,7 @@ int CountArchive(void)
sprintf(archiver.funarc, "%s -U", _PATH_NOMARCH); sprintf(archiver.funarc, "%s -U", _PATH_NOMARCH);
sprintf(archiver.munarc, "%s", _PATH_NOMARCH); sprintf(archiver.munarc, "%s", _PATH_NOMARCH);
sprintf(archiver.iunarc, "%s", _PATH_NOMARCH); sprintf(archiver.iunarc, "%s", _PATH_NOMARCH);
sprintf(archiver.varc, "%s -l", _PATH_NOMARCH);
} }
fwrite(&archiver, sizeof(archiver), 1, fil); fwrite(&archiver, sizeof(archiver), 1, fil);
@ -109,6 +112,7 @@ int CountArchive(void)
archiver.available = TRUE; archiver.available = TRUE;
sprintf(archiver.marc, "%s aq", _PATH_LHA); sprintf(archiver.marc, "%s aq", _PATH_LHA);
sprintf(archiver.tarc, "%s tq", _PATH_LHA); sprintf(archiver.tarc, "%s tq", _PATH_LHA);
sprintf(archiver.varc, "%s l", _PATH_LHA);
sprintf(archiver.funarc, "%s xqf", _PATH_LHA); sprintf(archiver.funarc, "%s xqf", _PATH_LHA);
sprintf(archiver.munarc, "%s eqf", _PATH_LHA); sprintf(archiver.munarc, "%s eqf", _PATH_LHA);
sprintf(archiver.iunarc, "%s eqf", _PATH_LHA); sprintf(archiver.iunarc, "%s eqf", _PATH_LHA);
@ -116,6 +120,7 @@ int CountArchive(void)
archiver.available = FALSE; archiver.available = FALSE;
sprintf(archiver.marc, "/usr/bin/lha aq"); sprintf(archiver.marc, "/usr/bin/lha aq");
sprintf(archiver.tarc, "/usr/bin/lha tq"); sprintf(archiver.tarc, "/usr/bin/lha tq");
sprintf(archiver.varc, "/usr/bin/lha l");
sprintf(archiver.funarc, "/usr/bin/lha xqf"); sprintf(archiver.funarc, "/usr/bin/lha xqf");
sprintf(archiver.munarc, "/usr/bin/lha eqf"); sprintf(archiver.munarc, "/usr/bin/lha eqf");
sprintf(archiver.iunarc, "/usr/bin/lha eqf"); sprintf(archiver.iunarc, "/usr/bin/lha eqf");
@ -131,6 +136,7 @@ int CountArchive(void)
sprintf(archiver.marc, "%s a -y", _PATH_RAR); sprintf(archiver.marc, "%s a -y", _PATH_RAR);
sprintf(archiver.barc, "%s c -y", _PATH_RAR); sprintf(archiver.barc, "%s c -y", _PATH_RAR);
sprintf(archiver.tarc, "%s t -y", _PATH_RAR); sprintf(archiver.tarc, "%s t -y", _PATH_RAR);
sprintf(archiver.varc, "%s l", _PATH_RAR);
sprintf(archiver.funarc, "%s x -o+ -y -r", _PATH_RAR); sprintf(archiver.funarc, "%s x -o+ -y -r", _PATH_RAR);
sprintf(archiver.munarc, "%s e -o+ -y", _PATH_RAR); sprintf(archiver.munarc, "%s e -o+ -y", _PATH_RAR);
sprintf(archiver.iunarc, "%s e", _PATH_RAR); sprintf(archiver.iunarc, "%s e", _PATH_RAR);
@ -139,12 +145,14 @@ int CountArchive(void)
sprintf(archiver.funarc, "%s x -o+ -y -r", _PATH_UNRAR); sprintf(archiver.funarc, "%s x -o+ -y -r", _PATH_UNRAR);
sprintf(archiver.munarc, "%s e -o+ -y", _PATH_UNRAR); sprintf(archiver.munarc, "%s e -o+ -y", _PATH_UNRAR);
sprintf(archiver.iunarc, "%s e", _PATH_UNRAR); sprintf(archiver.iunarc, "%s e", _PATH_UNRAR);
sprintf(archiver.varc, "%s l", _PATH_UNRAR);
} else { } else {
archiver.available = FALSE; archiver.available = FALSE;
sprintf(archiver.farc, "/usr/bin/rar a -y -r"); sprintf(archiver.farc, "/usr/bin/rar a -y -r");
sprintf(archiver.marc, "/usr/bin/rar a -y"); sprintf(archiver.marc, "/usr/bin/rar a -y");
sprintf(archiver.barc, "/usr/bin/rar c -y"); sprintf(archiver.barc, "/usr/bin/rar c -y");
sprintf(archiver.tarc, "/usr/bin/rar t -y"); sprintf(archiver.tarc, "/usr/bin/rar t -y");
sprintf(archiver.varc, "/usr/bin/rar l");
sprintf(archiver.funarc, "/usr/bin/unrar x -o+ -y -r"); sprintf(archiver.funarc, "/usr/bin/unrar x -o+ -y -r");
sprintf(archiver.munarc, "/usr/bin/unrar e -o+ -y"); sprintf(archiver.munarc, "/usr/bin/unrar e -o+ -y");
sprintf(archiver.iunarc, "/usr/bin/unrar e"); sprintf(archiver.iunarc, "/usr/bin/unrar e");
@ -159,6 +167,7 @@ int CountArchive(void)
sprintf(archiver.farc, "%s cfz", _PATH_TAR); sprintf(archiver.farc, "%s cfz", _PATH_TAR);
sprintf(archiver.marc, "%s Afz", _PATH_TAR); sprintf(archiver.marc, "%s Afz", _PATH_TAR);
sprintf(archiver.tarc, "%s tfz", _PATH_TAR); sprintf(archiver.tarc, "%s tfz", _PATH_TAR);
sprintf(archiver.varc, "%s tfz", _PATH_TAR);
sprintf(archiver.funarc, "%s xfz", _PATH_TAR); sprintf(archiver.funarc, "%s xfz", _PATH_TAR);
sprintf(archiver.munarc, "%s xfz", _PATH_TAR); sprintf(archiver.munarc, "%s xfz", _PATH_TAR);
sprintf(archiver.iunarc, "%s xfz", _PATH_TAR); sprintf(archiver.iunarc, "%s xfz", _PATH_TAR);
@ -167,6 +176,7 @@ int CountArchive(void)
sprintf(archiver.farc, "/bin/tar cfz"); sprintf(archiver.farc, "/bin/tar cfz");
sprintf(archiver.marc, "/bin/tar Afz"); sprintf(archiver.marc, "/bin/tar Afz");
sprintf(archiver.tarc, "/bin/tar tfz"); sprintf(archiver.tarc, "/bin/tar tfz");
sprintf(archiver.varc, "/bin/tar tfz");
sprintf(archiver.funarc, "/bin/tar xfz"); sprintf(archiver.funarc, "/bin/tar xfz");
sprintf(archiver.munarc, "/bin/tar xfz"); sprintf(archiver.munarc, "/bin/tar xfz");
sprintf(archiver.iunarc, "/bin/tar xfz"); sprintf(archiver.iunarc, "/bin/tar xfz");
@ -181,6 +191,7 @@ int CountArchive(void)
sprintf(archiver.farc, "%s cfj", _PATH_TAR); sprintf(archiver.farc, "%s cfj", _PATH_TAR);
sprintf(archiver.marc, "%s Afj", _PATH_TAR); sprintf(archiver.marc, "%s Afj", _PATH_TAR);
sprintf(archiver.tarc, "%s tfj", _PATH_TAR); sprintf(archiver.tarc, "%s tfj", _PATH_TAR);
sprintf(archiver.varc, "%s tfj", _PATH_TAR);
sprintf(archiver.funarc, "%s xfj", _PATH_TAR); sprintf(archiver.funarc, "%s xfj", _PATH_TAR);
sprintf(archiver.munarc, "%s xfj", _PATH_TAR); sprintf(archiver.munarc, "%s xfj", _PATH_TAR);
sprintf(archiver.iunarc, "%s xfj", _PATH_TAR); sprintf(archiver.iunarc, "%s xfj", _PATH_TAR);
@ -189,6 +200,7 @@ int CountArchive(void)
sprintf(archiver.farc, "/bin/tar cfj"); sprintf(archiver.farc, "/bin/tar cfj");
sprintf(archiver.marc, "/bin/tar Afj"); sprintf(archiver.marc, "/bin/tar Afj");
sprintf(archiver.tarc, "/bin/tar tfj"); sprintf(archiver.tarc, "/bin/tar tfj");
sprintf(archiver.varc, "/bin/tar tfj");
sprintf(archiver.funarc, "/bin/tar xfj"); sprintf(archiver.funarc, "/bin/tar xfj");
sprintf(archiver.munarc, "/bin/tar xfj"); sprintf(archiver.munarc, "/bin/tar xfj");
sprintf(archiver.iunarc, "/bin/tar xfj"); sprintf(archiver.iunarc, "/bin/tar xfj");
@ -203,6 +215,7 @@ int CountArchive(void)
sprintf(archiver.farc, "%s cf", _PATH_TAR); sprintf(archiver.farc, "%s cf", _PATH_TAR);
sprintf(archiver.marc, "%s Af", _PATH_TAR); sprintf(archiver.marc, "%s Af", _PATH_TAR);
sprintf(archiver.tarc, "%s tf", _PATH_TAR); sprintf(archiver.tarc, "%s tf", _PATH_TAR);
sprintf(archiver.varc, "%s tf", _PATH_TAR);
sprintf(archiver.funarc, "%s xf", _PATH_TAR); sprintf(archiver.funarc, "%s xf", _PATH_TAR);
sprintf(archiver.munarc, "%s xf", _PATH_TAR); sprintf(archiver.munarc, "%s xf", _PATH_TAR);
sprintf(archiver.iunarc, "%s xf", _PATH_TAR); sprintf(archiver.iunarc, "%s xf", _PATH_TAR);
@ -211,6 +224,7 @@ int CountArchive(void)
sprintf(archiver.farc, "/bin/tar cf"); sprintf(archiver.farc, "/bin/tar cf");
sprintf(archiver.marc, "/bin/tar Af"); sprintf(archiver.marc, "/bin/tar Af");
sprintf(archiver.tarc, "/bin/tar tf"); sprintf(archiver.tarc, "/bin/tar tf");
sprintf(archiver.varc, "/bin/tar tf");
sprintf(archiver.funarc, "/bin/tar xf"); sprintf(archiver.funarc, "/bin/tar xf");
sprintf(archiver.munarc, "/bin/tar xf"); sprintf(archiver.munarc, "/bin/tar xf");
sprintf(archiver.iunarc, "/bin/tar xf"); sprintf(archiver.iunarc, "/bin/tar xf");
@ -230,11 +244,13 @@ int CountArchive(void)
archiver.available = FALSE; archiver.available = FALSE;
if (strlen(_PATH_UNARJ)) { if (strlen(_PATH_UNARJ)) {
sprintf(archiver.tarc, "%s t", _PATH_UNARJ); sprintf(archiver.tarc, "%s t", _PATH_UNARJ);
sprintf(archiver.varc, "%s l", _PATH_UNARJ);
sprintf(archiver.funarc, "%s x", _PATH_UNARJ); sprintf(archiver.funarc, "%s x", _PATH_UNARJ);
sprintf(archiver.munarc, "%s e", _PATH_UNARJ); sprintf(archiver.munarc, "%s e", _PATH_UNARJ);
sprintf(archiver.iunarc, "%s e", _PATH_UNARJ); sprintf(archiver.iunarc, "%s e", _PATH_UNARJ);
} else { } else {
sprintf(archiver.tarc, "/usr/bin/unarj t"); sprintf(archiver.tarc, "/usr/bin/unarj t");
sprintf(archiver.varc, "/usr/bin/unarj l");
sprintf(archiver.funarc, "/usr/bin/unarj x"); sprintf(archiver.funarc, "/usr/bin/unarj x");
sprintf(archiver.munarc, "/usr/bin/unarj e"); sprintf(archiver.munarc, "/usr/bin/unarj e");
sprintf(archiver.iunarc, "/usr/bin/unarj e"); sprintf(archiver.iunarc, "/usr/bin/unarj e");
@ -250,6 +266,7 @@ int CountArchive(void)
sprintf(archiver.marc, "%s -2d -y -e a", _PATH_ARJ); sprintf(archiver.marc, "%s -2d -y -e a", _PATH_ARJ);
sprintf(archiver.barc, "%s -2d -y c", _PATH_ARJ); sprintf(archiver.barc, "%s -2d -y c", _PATH_ARJ);
sprintf(archiver.tarc, "%s -y t", _PATH_ARJ); sprintf(archiver.tarc, "%s -y t", _PATH_ARJ);
sprintf(archiver.varc, "%s l", _PATH_ARJ);
sprintf(archiver.funarc, "%s -y x", _PATH_ARJ); sprintf(archiver.funarc, "%s -y x", _PATH_ARJ);
sprintf(archiver.munarc, "%s -y e", _PATH_ARJ); sprintf(archiver.munarc, "%s -y e", _PATH_ARJ);
sprintf(archiver.iunarc, "%s -y e", _PATH_ARJ); sprintf(archiver.iunarc, "%s -y e", _PATH_ARJ);
@ -259,6 +276,7 @@ int CountArchive(void)
sprintf(archiver.marc, "/usr/bin/arj -2d -y -e a"); sprintf(archiver.marc, "/usr/bin/arj -2d -y -e a");
sprintf(archiver.barc, "/usr/bin/arj -2d -y c"); sprintf(archiver.barc, "/usr/bin/arj -2d -y c");
sprintf(archiver.tarc, "/usr/bin/arj -y t"); sprintf(archiver.tarc, "/usr/bin/arj -y t");
sprintf(archiver.varc, "/usr/bin/arj l");
sprintf(archiver.funarc, "/usr/bin/arj -y x"); sprintf(archiver.funarc, "/usr/bin/arj -y x");
sprintf(archiver.munarc, "/usr/bin/arj -y e"); sprintf(archiver.munarc, "/usr/bin/arj -y e");
sprintf(archiver.iunarc, "/usr/bin/arj -y e"); sprintf(archiver.iunarc, "/usr/bin/arj -y e");
@ -287,10 +305,12 @@ int CountArchive(void)
sprintf(archiver.funarc, "%s -o -q", _PATH_UNZIP); sprintf(archiver.funarc, "%s -o -q", _PATH_UNZIP);
sprintf(archiver.munarc, "%s -o -j -L", _PATH_UNZIP); sprintf(archiver.munarc, "%s -o -j -L", _PATH_UNZIP);
sprintf(archiver.iunarc, "%s -o -j", _PATH_UNZIP); sprintf(archiver.iunarc, "%s -o -j", _PATH_UNZIP);
sprintf(archiver.varc, "%s -l", _PATH_UNZIP);
} else { } else {
sprintf(archiver.funarc, "/usr/bin/unzip -o -q"); sprintf(archiver.funarc, "/usr/bin/unzip -o -q");
sprintf(archiver.munarc, "/usr/bin/unzip -o -j -L"); sprintf(archiver.munarc, "/usr/bin/unzip -o -j -L");
sprintf(archiver.iunarc, "/usr/bin/unzip -o -j"); sprintf(archiver.iunarc, "/usr/bin/unzip -o -j");
sprintf(archiver.varc, "/usr/bin/unzip -l");
} }
fwrite(&archiver, sizeof(archiver), 1, fil); fwrite(&archiver, sizeof(archiver), 1, fil);
@ -302,6 +322,7 @@ int CountArchive(void)
sprintf(archiver.farc, "%s aq", _PATH_ZOO); sprintf(archiver.farc, "%s aq", _PATH_ZOO);
sprintf(archiver.marc, "%s aq:O", _PATH_ZOO); sprintf(archiver.marc, "%s aq:O", _PATH_ZOO);
sprintf(archiver.barc, "%s aqC", _PATH_ZOO); sprintf(archiver.barc, "%s aqC", _PATH_ZOO);
sprintf(archiver.varc, "%s -list", _PATH_ZOO);
sprintf(archiver.funarc, "%s xqO", _PATH_ZOO); sprintf(archiver.funarc, "%s xqO", _PATH_ZOO);
sprintf(archiver.munarc, "%s eq:O", _PATH_ZOO); sprintf(archiver.munarc, "%s eq:O", _PATH_ZOO);
sprintf(archiver.iunarc, "%s eqO", _PATH_ZOO); sprintf(archiver.iunarc, "%s eqO", _PATH_ZOO);
@ -310,6 +331,7 @@ int CountArchive(void)
sprintf(archiver.farc, "/usr/bin/zoo aq"); sprintf(archiver.farc, "/usr/bin/zoo aq");
sprintf(archiver.marc, "/usr/bin/zoo aq:O"); sprintf(archiver.marc, "/usr/bin/zoo aq:O");
sprintf(archiver.barc, "/usr/bin/zoo aqC"); sprintf(archiver.barc, "/usr/bin/zoo aqC");
sprintf(archiver.varc, "/usr/bin/zoo -list");
sprintf(archiver.funarc, "/usr/bin/zoo xqO"); sprintf(archiver.funarc, "/usr/bin/zoo xqO");
sprintf(archiver.munarc, "/usr/bin/zoo eq:O"); sprintf(archiver.munarc, "/usr/bin/zoo eq:O");
sprintf(archiver.iunarc, "/usr/bin/zoo eqO"); sprintf(archiver.iunarc, "/usr/bin/zoo eqO");
@ -324,6 +346,7 @@ int CountArchive(void)
sprintf(archiver.farc, "%s a21rq", _PATH_HA); sprintf(archiver.farc, "%s a21rq", _PATH_HA);
sprintf(archiver.marc, "%s a21q", _PATH_HA); sprintf(archiver.marc, "%s a21q", _PATH_HA);
sprintf(archiver.tarc, "%s t", _PATH_HA); sprintf(archiver.tarc, "%s t", _PATH_HA);
sprintf(archiver.varc, "%s l", _PATH_HA);
sprintf(archiver.funarc, "%s eyq", _PATH_HA); sprintf(archiver.funarc, "%s eyq", _PATH_HA);
sprintf(archiver.munarc, "%s eyq", _PATH_HA); sprintf(archiver.munarc, "%s eyq", _PATH_HA);
sprintf(archiver.iunarc, "%s eyq", _PATH_HA); sprintf(archiver.iunarc, "%s eyq", _PATH_HA);
@ -332,6 +355,7 @@ int CountArchive(void)
sprintf(archiver.farc, "/usr/bin/ha a21rq"); sprintf(archiver.farc, "/usr/bin/ha a21rq");
sprintf(archiver.marc, "/usr/bin/ha a21q"); sprintf(archiver.marc, "/usr/bin/ha a21q");
sprintf(archiver.tarc, "/usr/bin/ha t"); sprintf(archiver.tarc, "/usr/bin/ha t");
sprintf(archiver.varc, "/usr/bin/ha l");
sprintf(archiver.funarc, "/usr/bin/ha eyq"); sprintf(archiver.funarc, "/usr/bin/ha eyq");
sprintf(archiver.munarc, "/usr/bin/ha eyq"); sprintf(archiver.munarc, "/usr/bin/ha eyq");
sprintf(archiver.iunarc, "/usr/bin/ha eyq"); sprintf(archiver.iunarc, "/usr/bin/ha eyq");
@ -519,6 +543,7 @@ int EditArchRec(int Area)
mvprintw(15, 2, "9. Un. files"); mvprintw(15, 2, "9. Un. files");
mvprintw(16, 2, "10. Un. mail"); mvprintw(16, 2, "10. Un. mail");
mvprintw(17, 2, "11. FILE_ID"); mvprintw(17, 2, "11. FILE_ID");
mvprintw(18, 2, "12. List arc");
for (;;) { for (;;) {
set_color(WHITE, BLACK); set_color(WHITE, BLACK);
@ -533,8 +558,9 @@ int EditArchRec(int Area)
show_str(15,16,64, archiver.funarc); show_str(15,16,64, archiver.funarc);
show_str(16,16,64, archiver.munarc); show_str(16,16,64, archiver.munarc);
show_str(17,16,64, archiver.iunarc); show_str(17,16,64, archiver.iunarc);
show_str(18,16,64, archiver.varc);
j = select_menu(11); j = select_menu(12);
switch(j) { switch(j) {
case 0: crc1 = 0xffffffff; case 0: crc1 = 0xffffffff;
crc1 = upd_crc32((char *)&archiver, crc1, sizeof(archiver)); crc1 = upd_crc32((char *)&archiver, crc1, sizeof(archiver));
@ -566,6 +592,7 @@ int EditArchRec(int Area)
case 9: E_STR( 15,16,64,archiver.funarc, "The ^Unarchive^ command for files") case 9: E_STR( 15,16,64,archiver.funarc, "The ^Unarchive^ command for files")
case 10:E_STR( 16,16,64,archiver.munarc, "The ^Unarchive^ command for mail packets") case 10:E_STR( 16,16,64,archiver.munarc, "The ^Unarchive^ command for mail packets")
case 11:E_STR( 17,16,64,archiver.iunarc, "The ^Unarchive^ command to extract the FILE_ID.DIZ file") case 11:E_STR( 17,16,64,archiver.iunarc, "The ^Unarchive^ command to extract the FILE_ID.DIZ file")
case 12:E_STR( 18,16,64,archiver.varc, "The ^List^ command to show the archive contents")
} }
} }
@ -784,6 +811,7 @@ int archive_doc(FILE *fp, FILE *toc, int page)
fprintf(fp, " Unpack files %s\n", archiver.funarc); fprintf(fp, " Unpack files %s\n", archiver.funarc);
fprintf(fp, " Unpack mail %s\n", archiver.munarc); fprintf(fp, " Unpack mail %s\n", archiver.munarc);
fprintf(fp, " Get FILE_ID.DIZ %s\n", archiver.iunarc); fprintf(fp, " Get FILE_ID.DIZ %s\n", archiver.iunarc);
fprintf(fp, " List archive %s\n", archiver.varc);
fprintf(fp, "\n\n"); fprintf(fp, "\n\n");
j++; j++;
} }