|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T m
Length: 895 (0x37f) Types: TextFile Names: »mpss.c.orig«
└─⟦b20c6495f⟧ Bits:30007238 EUUGD18: Wien-båndet, efterår 1987 └─⟦this⟧ »EUUGD18/General/Mpss/mpss.c.orig«
#include <stdio.h> #include "files.h" main(argc,argv) int argc; char *argv[]; { int i; char c; char *tnam; char terminalfile[14]; i=umask(000); /*to make sure files are created with the right permissions.*/ if (isatty(1)!=1) { fprintf(stdout," You cannot play from a file\n"); exit(0); } tnam=(char *)ttyname(1); strcpy(terminalfile,tnam); /*Now make the terminal file rw access for everyone!*/ if (chmod(terminalfile, 0666)<0) { fprintf(stdout,terminalfile); fprintf(stdout," : cannot chmod your terminal file!!!\n"); exit(0); } if (argc==1) execl(SLAVEPROGRAM,"slave",(char *) 0); else { if (argc==2) execl(SLAVEPROGRAM,"slave",argv[1],(char *) 0); else { if (argc==3) execl(SLAVEPROGRAM,"slave",argv[1],argv[2],(char *) 0); else { fprintf(stderr,"Usage: mpss {-i} {-t}\n"); exit(0); } } } }