UNIXKK,%"b"_"\"Y"V"S"P"M"J"G"D"A">";"8"5"2"/","&"#" """"""" """!!!!!!!!!!!!!!!!!#  ! mt(0,7)gggA0""W--#-,].-t-,H-R--, /j^-/u---t-,- x{a:/$G/v -h x-e xA// #-d x.&)-_ x@,/-_d625-[ x 8;>-Z x \ADGJM- x}c^PSVY\_behk-Znqt-Y<wz}- xtW-U xC-U xxxxx-U x( x*-L-K x-J8-F x;-E x-E xq-E x@ -B x^ -B x -B x-@ x"%-@ x(+.-? xP14-i x7:-c=@C-bBFI-g xwLORUX[^adgjzz-^ x- xtX A xuX-j- xm-]C-T x- xq3 x-K x{  -A x-A x~-@ xA H||"%-@(+.147:=@CF$3P{4{4X[-^ad-ԟ gjmpsvy-|T x S x < xo9-^x" G  - x_>y- 6!$'*-0-rc 369<?- xkBEH; xmO 'KNQTWZ]N xkAA++`cfiloru-*qkx- xl{~-K xg- x~f ~>e7-Ng- x}d?- x~f`I x}d- x--- xׁׁׁׁׁׁ͒͒͒͒͒͒͒͒͒͒͒͒ ׁׁׁ͒͒͒͒͒͒͒}ׁׁ͒͒͒͒zׁ͒͒w͒A/͒͒ʁ BlB6#&),/258;>A((z}&&)t&&%6&&7t"%(+.147:=@͐UTUT y|&&M͑~l<A0/l< ͐l:A /z z l8l7rl7 ̓̓l7o̓̓f>>l6 s̓̓̓̓_l5l4  l4ml4̓̓"l3g!l3{$'l2*-l2G03l2 6l29<D3D3?̓̓9Bl1~E̓̓gHKN̓̓IQTWZIr]`cfiloru/f x{/f`͌ف~/fͅ!͌ف/fl. /fl. /fl- /fU͌ف{/fl- Y/fK͌ف/fI͌ف /fl, /fl+ /fl+ e/f͈|͌ف /fRR/fl)  /fl) /fl)  #&)/f͆͌فp,/,5l( 25,-l( T8;/fSVSV?>,/l' _A/fl'  DG/f%͌فJ/fl&  oMPSVY\/fSUSU6_b/fl% A/͌K͌KADDee-דjyhk-nq- x$twz}- xyG x=-< - x oFc( x- xrγβγγβγγβγnγβγD γβmγPβέ γ0βlγɒ  !$βΰlγA/ββŁi 8 ;- x< > A D G J M P S V Y \͏u}u} ΩQl ΩVl Ω Ω]l8         ͓S^+^+U Y \ _ b e h k n q t w ͓S^(^( o r u x { ~ ͓S^^A/l G J M P S V Y \ _ b e͐xl|m z- x( } ͏^!H ͏W H#$ .K)r)r"   .I)p)p -q -Mn ͐lj ͐li*( {11jl    # & ) , / 2 5x11Kh s11AP/lhz 1 4 7 : = @ C F I L O&66^8       '66A@/lb w  " % ( +͒  ́ . 1 4͑l\) 7 :͑l[ = @ C F I L O R U͑l[N X [ ^ a d g j m p s v͑6= Ɂy K͒;͒;A/l\ UWAWA UW@W@   UW?W?    UW=W=   ! $UW<W< ' * - 0UW;W; 3 6 9 <UW9W9 ? B E HRW8W8 K N Q TUW7W7 W Z ] `UW5W5 c f i lUW4W4 o r u xUW3W3A/lV {͒nׁ͒ ~ׁ͒͒ Sׁ͒ ׁ͒͒ ׁ͒͒ ͒sׁ͒ Sׁ͒ ׁ͒͒ ׁ͒͒ ׁ͒͒ ׁ͒͒ ׁ͒͒! O x - xr -c xt - x -e  - x I~  -~ -f}Z #&),/258- x}>ADG-=|AJMPS- x{V8 x{Y- x{\-j xz_beh- xzknq- xz twz} x x b x x x x x xX/D x,9/ x [, Z x"%(+.14-AApG||7:=@ xCF/~T ILORUXSD[^ad xgjP mpsT2vy|@82 E EiAG|| u x u s x Q r x  u x큤s x쁤s x쁤e!$w x쁤>'*t x끤-036v x끤y9<x x끤?x xꁤ]Bx xꁤEHKNx xꁤQTw x遤WZw x遤]`x x遤cv x聤fiv x聤5loru x灤uw x灤Dx{w x灤~w x恤u x䁤8u x䁤v xつv xつv xၤu xၤu xd γΪ&γTγΪ&γht x  #&),/tb2t x߁58t x߁{;>AtDt x bGJMPSVQ xuYY\t x_bs x݁ehks x݁Sns x܁qts x܁fwz}s xہs xہr xہs xځs xځ r xفF r xفr r xف^ q؁ w x؁ r x؁ r xׁ r xׁ q xցP q xAG|| -Y xՁU -S xԁ)  -S xcCFI-UЁ.LO-L xЁRUX[^adgjm-EЁ5ps-F x΁vy|-H΁-@V 0/dq./u /s./u-/E-R/z@}/M/j/jWZ]`c&O'f:iQ lorux{/k/j/u(~ηη.gPtB=@ x xhC xmF x xXILORUX[^adgεεAG""7vv-/yt/yt--/yU/y_/y_   x P!$'*@ %q-0369<?BEHK/y/y/yׁilo x )ru x AG--x{~ " x 6 x  x E x  xAG|| ` x  x#& xg),/2 x58 x;> xA xgDGJM xAG||PSVY\_be x0hknqtwz}/m-/{8@}*/mA/i5/v---,N.--,*  /s./u[CFILORUX[^a/.5/v\vy/s./umm:mm /!$'mm.*-mmO0369<?BEHKN mmWZmm]mm`mmcmm filorummx{~mm-mmmmmmRmm.e2Ӂ{mmmmmmmmmmmm: mm$mmqA /mE #&),/258;>$-{-{-/$1{5{5j$-{\K$+{+{+$0Yrr|  z{6{6'$'*-0369<?B$+{){)8cfilorux{~...E,m}---,7$1{3{3 n #&),/>2/v/258;>ADGJM]mA0/m!\_behknqtwz.{1{1A {\{\ιRm&A MSA  A`/ιNιNA@/ι7ι7Ap/4x4x$mX$B/Nс-9<?BEHKNQTWm~loi rux{~sḿ0~EAp/m{PUKPUDP!$'*-0369U=A mxkWDGJMPSVY\_b/h. /u m  m    mAP/mǁ" "%(+.1ZN/{Á$MLORWm/{$_UX[^adgjmpsVm/{Ap/-mmā$mmÁ2%""Jmmtmmmmh mmA //N- xp u #&-c(-d-d)+E E ,/258;>ADG- xx]JM- xt=PSVY\_behkn-~ xsW- xs+͏Z!H- xvZ---,--|-+A0/&e~/u- xy^-h xlM3 xz_- xz`  xx] G x{` - x{`- x{aR- x{aA /4x4xx"%(+-` xkK.14-ЫK7- xt:- xl x=@CFIL-_ xjJ ORUdgj- xlmpsvy|yy69- xvh<?BEHKNQTWZ8;N;4_4_4_(- xm- xu   - x|b - xn-r xoQx"%(+.147:E%/{8IL-c xkKJORUX[^adgjm-i--;o-h xkL*t{/{/{/'*-0369<?-i<MBEHK-k xlM ~NQTWZ]`-d xkL $cfilo-o xnPr-oItPux-n xnP {~-_Q< xpRh,{.{.R- xo-n xnO- xnT(z(z(z - xy^d (z(z(z#&-h xlMA0/??Cl),/258;>ADGlll-ы\-[-uq- xvZA RAP>>9- xuz-t xqSιjY- x|b   -t xpS"%(BY.+.-g xkL147:=@CFI- xy^LO-m xmO RUX[^.5./uadgjmpsvy-s xpR|---+r-l xmN97 xjJ- xr- xuYT xuSauu0-w xrU1369<?BEH-UAKNQT-v xqTWZ-v xqT R]`cfi-u xqT]l= xqSorux{~/[>1/v)- xw[- xz_ &d|/u7x uu<- x{bA H/y/y /j4/u #&),//jUp/u  /x8/s/yt"/s/s/u%//k/uA///(+.147:=LOR/5P/v[^adgjmpsvy/!/v"%/=>/v./2/vM/j8#/vQ/n/j/v/k/hz/v /U\/v /)k/v(!$'*-03/5 /v"FHKNQTWZ]`cf/1H/v' /1:/v/FU\/v_/U\/v8/E/v),/U\/v-/258;>MPSVY/x>'x/vAP//p/p.'JL/{90/G/c/cQ /{/j/{8 /|2</{8 /dU\/{8 /(/{9 /~m/{9I /~U\/{9 /~U\/{94 !!!! ! !!!!/~l~/{9L!.!1@CFILORUX/~onT/{9^adgjmpsvy/~pU\/{8*|/~Hv&/{8/~*oS/{8-1 /}+/{8  - 0 3 6 9 < ? B E H K/}v?/{8M c f i l o r u x {/}U\/{8 ~ /}/{8B /}t/{8- /}T/{8{ /}8pwr/{8{ /}$U\/{8 J /}>(z/{8!!!! /|(/{8!!!!!!! !#!&!)!,/|pw/{8MPSVY\_be/|U\/{8hknqtwz}/|/l/{8/{U\/{8./{U\/{8A///A Z//z/)/z5/U\/z//z /U\/z <    /u@/z  /U\/z    " % (/ss//zI + . 1 4/vU\/z6 7 : = @ C F I L O R U/.:/z [/U\/z ^->U\/z a d g j m/U\/z p->U\/z s v-AH/z y |  -=U\/z /7(/zn /~D/z -<U\/z /~U\/z /~7/z k /Õ/zX /~oWr/za /~oW#/zT /U\/z? /{U\/z_ /U\/z /U\/z /~F/z /| U\/z o !!/U\/z6!! /~F/zA`///! !!!!!!!!!$!'!*/s/s/uHw!6!9!<!?!B!E!H!K!N!Q!T/j[|/u(!!!!!!!!!!!/)>0/v!!!!!!!!"/w>2/v""- xw\ " """&e/u """" "#"&(b lF/u")/g/z...fsrcincludehlib %mandict{spooltgamespub HsysVdocvrmwbintmpsys.dumpa14.outacct_0825touchtype...hlistahlistbhstoppapers}words|spellhistt switch kernel process switch equ * li r0,ps.disb disable interrupts epsr r1,r0 lb r1,runrun higher-priority process waiting? lr r1,r1 bz nswtch no - restore interrupted process li r0,ps.kern enable interrupts epsr r1,r0 li r0,12 trap 12 is give up cpu st r0,0(sp) bal rf,trap call trap routine again nswtch equ * * restore status of interrupted process noswtch equ * li r0,ps.disb disable interrupts epsr r1,r0 l rf,10*adc(sp) restore link reg stm r8,8*adc+nr.regs save r8-rf lm r8,2*adc(sf...libclibmcmdlibI77libplotlibF77libdbmgamescmd_pdp11libmplibfpsim_pdp11wgong...asciieqnchargreekp) save r0-sp stm r8,nr.regs lm re,11*adc(sp) old psw ahi sp,14*adc pop stack ifnz M3200 * restore microcode scratchpad registers (3200 only) ti re,ps.iip interruptible instruction interrupted? bz noriip no - skip psf 6,0(sp) restore scratchpad regs ahi sp,16*adc pop stack noriip equ * endc * if previous mode was user, switch back to user address space thi re,ps.prot user mode? bz kernel1 no - stay in kernel mode epsr rd,rd current psw nhi rd,x'ffff'-ps.rp disable relocation ep". %..!acct.2 chmod.2chown.2kill.2mount.2nice.2signal.2stat.2utime.2time.2times.2write.2access.2alarm.2chdir.2close.2creat.2dup.2exit.2fork.2getpid.2getuid.2ioctl.2link.2lseek.2mknod.2open.2pause.2pipe.2profil.2.t..cnohexagramsphxmacrosphxptrace.2read.2setuid.2stime.2hsync.2gumask.21unlink.20wait.2brk.2intro.2indir.2exec.2lock.2phys.2indexmpx.2mpxcall.2pkon.2V...READMEassemblerrunscopeadv.edtrofftutmakesummarycacmimplementbceqntroffcmanctourshellsedf77beginnersuprogyacclintratform4referlextbldcawkadbsr r0,rd l r1,uisa user seg regs bal r6,addrsw kernel1 equ * * return to previous status st sp,ksp save kernel stack pointer ni re,y'ffffffff'-ps.wait turn off 'wait' bit stm re,nr.psw save return psw ifnz PIC bal r6,rdpic get last pic timing interval am r5,sytim add interval to sys time endc lm r0,nr.regs restore all regs lpsw nr.psw back to previous mode * stack overflow panic - called instead of 'trap' or interrupt routine * to force a panic when kernel stack overflows stkovflo ...readf01f02f03f04f05f06f07f08f09tempf10f11f12f13f14f15f16f17f18f19f20f21f22f23f24f25f26f27f28passwordiosysporttoursecuritymsmacrosedtutuucpsetupregenlearnindexequ * dc f'0' crash with illegal instruction impur * Non-reentrant save area for use while switching register sets nr.intp das 1 interrupt handler address save nr.psw das 2 psw save nr.regs das 16 register save * Kernel mode stack pointer save entry ksp,maxsp ksp das 1 save stack pointer during user mode execution maxsp das 1 pointer to top of stack segment (initialized by start) ***************************************************************** * * * addrsw: Switch Address Space Mapping f29f30f31f32f33f34f35f36f37f38f39f40f41f42f43f44f45f46f47f48f49f50f51f52f53f54f55f56f57f58f59f60.{.. -empty * * * * input: r1 = &(new segment table descriptor) * * r6 = return address * * * * Must be called with relocation & interrupts disabled * * * ***************************************************************** pure entry addrsw addrsw equ * ifnz M3200 psf 1,0(r1) lpstd process table descriptor psf 2,4(r1) lsstd shared table descriptor else extrn macregs l r1,0(r1) address of seg registers ni r1,y'fffff' address part lhi r4,15*adc start at last reg seglpf61f62f63f64f65f66f67f68f69f70f71f72f73f74f75f76f77f78f79f80f81f82f83f84f85f86f87f88f89f90f91f92d.{.. equ * l r0,0(r1,r4) next seg value st r0,macregs(r4) store in mac reg sis r4,adc back up bnm seglp repeat for all seg regs endc br r6 ***************************************************************** * * * Floating-point Register Save / Restore * * * ***************************************************************** entry savfp,restfp * save floating point registers savfp equ * ifnz FPREGS!DPREGS l r1,0(sp) fp save area in u ifnz FPREGS stme r0,0(r1) save single-precf93f94f95f96f97f98f99block.coutblock.oblockl.outf105f106f107f108. &..79.130.0330.91ision regs endc ifnz DPREGS stmd r0,8*adc(r1) save double-precision regs endc endc br rf * restore floating point registers restfp equ * ifnz FPREGS!DPREGS l r1,0(sp) fp save area in u ifnz FPREGS lme r0,0(r1) save single-precision regs endc ifnz DPREGS lmd r0,8*adc(r1) save double-precision regs endc endc br rf ifnz PIC ***************************************************************** * * * rdpic: Get length of last precision timing interval * * \.h..[ftCZftCEYftGXftCIWftCKVftCSUftCWTftGISftIRftGMQftGRPftLIOftLftRftPAftPBftPIftSBftSftBCftSIftSM ftUD ftXM ftB %... man1"man2man3Gman4;man5man6man7man8man0 * * r5 - returned value * * r6 - return address * * r0-r1 - work regs * * * ***************************************************************** pure extrn clockaddr entry rdpic rdpic equ * lb r0,clockaddr address of pic rhr r0,r1 read interval l r5,pictim previous count sr r5,r1 real current clock interval bp ras1 positive? ai r5,1000 no - must have wrapped around ras1 st r1,pictim save current count br r6 return * PIC timing information impur entry sytim pictim dac f.h..encform &.{.. 'lasttimedone79.130.0330.91past1000 last PIC interval count sytim dac 0 accumulated system time | MUST BE utime dac 0 user time | KEPT itime dac 0 idle time | TOGETHER endc h...gyaccparflexdmakekeybookbspelladiffh`diff3_calendar^atrun]crontab\font |libmp.a termtmacstructrefercigneignllib-lm}libF77.alibI77.alint1lint2llib-lcllib-port libdbm.aunitsuucpccom__.SYMDEF . %.. nac.1mvar.1olearn.1iat.1basename.1bc.1 Ccal.1calendar.1cat.1Tcb.1cc.1chmod.1 dchown.1clri.1m \cmp.1col.1comm.1cp.1crypt.1as.1date.1 bdc.1dcheck.1m ;dd.1 *deroff.1 df.1m diff.1 diff3.1 du.1 tp.1.TH OSEXPORT 1 Perkin-Elmer .SH NAME osexport \- copy a file to an OS/MT disc .SH SYNOPSIS .B osexport device file [ recl ] .SH DESCRIPTION Copies the specified file onto the device, which must contain a Perkin-Elmer OS/MT file system. The OS filename is formed by translating the UNIX filename to uppercase, and taking any characters after the last period as an extension. (Name and extension are truncated to 8 and 3 characters respectively.) The created file will be INDEXED, with a logical record length of learnteelcountlpd f0libln.av10400v110400 echo.1ed.1eqn.1 ccvobj.1file.1graph.1g xgrep.1ticheck.1m >iostat.1m join.1kill.1 ld.1 lex.1 ln.1 login.1[ls.1m4.1mail.1 Lmake.1Omesg.1 mkdir.1Xmount.1mZmv.1\ncheck.1m]newgrp.1^nice.1`nm.1.od.1 passwd.1 .pr.1prof.1ps.1 .I recl (default 256). Note that .I osexport does not format the file into fixed-length records: .I recl is used only to initialize the OS directory entry. .SH AUTHOR R Miller .br University of Wollongong .SH SEE ALSO dfi(1), osimport(1) .SH BUGS The OS disc must contain at least one directory block. .br No check is made for already existing files. This may result in multiple OS files with the same name. .br There is no way to delete an OS file. .br Doesn't know about "Dynamic OS/MT" account numbers. ...acct.hbuf.hcallo.hconf.hdir.hfblk.hfile.hfilsys.hino.hinode.hmap.hmount.hmpx.hmx.hparam.hpk.hprim.hproc.hreg.hseg.hstat.hsystm.htext.htimeb.htimes.htty.htypes.huser.hpk.pptx.1pwd.1rquot.1mdump.1m@rev.1Srm.1roff.1= NGROUPS) return(NULL); /***/ return(&groups[d]); } mxopen(dev, flag) { register struct group *gp; register struct file *fp; register struct chan *cp; int msg; gp = getmpx(dev); if (gp == NULL).h..structurebeautifyconf.3240.melunix.3240.scL.s.256devconf.3240.mel.xyzunix.40.sc.oldxxxyyyunix.3240.melunix { bad: u.u_error = ENXIO; return; } if (gp->g_state == COPEN) { gp->g_state = INUSE+ISGRP; return; } if (!(gp->g_state&INUSE)) goto bad; fp = u.u_ofile[u.u_r.r_val1]; if (fp->f_inode != gp->g_inode) goto bad; if ((cp=addch(gp->g_inode, 0))==NULL) goto bad; cp->c_flags = XGRP; cp->c_ottyp = cp->c_ttyp = (struct tty *)cp; cp->c_line = cp->c_oline = mpxline; fp->f_flag |= FMPY; fp->f_flag |= FREAD+FWRITE; fp->f_un.f_chan = cp; if (gp->g_inode == mpxip) { plock(mpxip); mpxna.h..tmac.antmac.stmac.scovertmac.sdisptmac.skeeptmac.srefs '. H.. &bio.c %partab.c $tty.c #sys.c "mem.c !dsk.c mt.c vdu.c selch.c pk0.c dsp.c mklibLIB2 makefile pk1.c msm.c cli.cbio.o mx1.c lp.c/mx2.c pk2.c dsa.cmpk3.ccli.od40.odsa.odsk.odsp.olp.ome(cp); msg = M_OPEN; } else msg = M_WATCH; /***/ trace(0x80000000, "mxopen", msg); scontrol(cp, msg, u.u_uid); sleep((caddr_t)cp,TTIPRI); if (cp->c_flags&NMBUF) prele(mpxip); if (cp->c_flags & WCLOSE) { chdrain(cp); chfree(cp); goto bad; } cp->c_fy = fp; cp->c_pgrp = u.u_procp->p_pgrp; } char mxnmbuf[NMSIZE]; int nmsize; struct chan *mxnmcp; mpxname(cp) register struct chan *cp; { register char *np; register c; np = mxnmbuf; u.u_dirp = (caddr_t)u.u_arg[0]; while (np < &mxnmbuf[NM .h..tab300-12tab300tab300s-12tab300stab37tab450-12-8tab450-12tab450tab832taba1tablptabtn300mem.omsm.omt.omx1.omx2.opartab.opk0.opk1.opk2.opk3.oselch.osys.otty.ovdu.oselch.osys.otty.ovdu.oLIB2.32400d40.cd40.oSIZE]) { c = uchar(); if (c <= 0) break; *np++ = c; } *np++ = '\0'; nmsize = np - mxnmbuf; cp->c_flags |= NMBUF; } mxclose(dev, flag, cp) dev_t dev; register struct chan *cp; { register struct group *gp; register struct inode *ip; register struct file *fp; int i, fmp; fmp = flag&FMP; /* * close a channel */ if (cp!=NULL && fmp && fmp!=FMP) { for(fp=file; fp < &file[NFILE]; fp++) if(fp->f_count && fp->f_flag&FMP && fp->f_un.f_chan==cp){ return; } chdrain(cp); if (;. %..:a.out.59acct.58ar.57core.56dir.5index4filsys.53passwd.52tp.51types.50utmp.5/environ.5.group.5-mtab.5,plot.5+ttys.5dtp.5)dump.5filsys.olda68.out.5mpxio.5 G. H.. Facct.c Ealloc.c Dclock.c Cfio.c Biget.c Amachdep.c @main.c ?malloc.c >nami.c =pipe.c c_flags&WCLOSE)==0) { /***/ trace(0x80000000, "mxclose", M_CLOSE); scontrol(cp, M_CLOSE, 0); cp->c_flags |= WCLOSE; } else { chfree(cp); /***/ trace(0x80000000, "mxclose", -1); } return; } if ((gp = getmpx(dev)) == NULL) return; ip = gp->g_inode; if (ip==NULL || (ip->i_mode&IFMT)!=IFMPC) { return; } for(fp=file; fp < &file[NFILE]; fp++) { if (fp->f_count && (fp->f_flag&FMP)==FMP && fp->f_inode==ip) { return; } } if (ip == mpxip) { mpxip = NULL; prele(ip); }G. %..Fcli.4Edsk.4Dtty.4Clp.4Bmem.4Anull.4@msm.4?mt.4>pals.4indexg_chans[i])!=NULL) detach(cp); /***/ groups[minor(dev)].g_inode = NULL; plock(ip); i = ip->i_mode; i &= ~IFMT; i |= IFCHR; ip->i_mode = i; zero((caddr_t)gp, sizeof (struct group)); ip->i_flag |= IUPD|ICHG; iput(ip); } zero(s, cc) register char *s; register cc; { while (cc--) *s++ = 0; } char m_eot[] = { #ifdef DEC M_EOT, 0, 0, 0 #else 0, M_EOT, 0, 0 #endif }; /* * Mxread + mxwrite are entered from cdevsw * for all read/write calls. Operations on . %..assert.3xabs.3atof.3crypt.3ctime.3stdio.3sabort.3ctype.3ecvt.3end.3getc.3sfrexp.3exp.3m~floor.3m}fopen.3s|fseek.3s{getenv.3zgetgrent.3ygetlogin.3wgetpass.3rgetpw.3pgetpwent.3ogets.3snhypot.3mmintro.3ll3tol.3fmalloc.3emktemp.3dpopen.3scprintf.3s H... Gsys 'dev conf hcompmailboottest * an mpx file are handled here. * Calls are made through linesw to handle actual * data movement. */ mxread(dev) { register struct group *gp; register struct chan *cp; register esc; struct rh h; caddr_t base; unsigned count; int s, xfr, more, fmp; if ((gp=getmpx(dev))==NULL) { bad: u.u_error = ENXIO; return; } FP = getf(u.u_arg[0]); fmp = FP->f_flag & FMP; if (fmp != FMP) { msread(fmp, FP->f_un.f_chan); return; } if ((int)u.u_base & 1) goto bad; s = spl6(); while (gp->g_datq == 0) {bputs.3samonitor.3`nlist.3_scanf.3s^setbuf.3s]sinh.3m\perror.3[qsort.3Zrand.3Yungetc.3sXsetjmp.3Wsleep.3Vstring.3Uswab.3Tsystem.3Sttyname.3Rputc.3sQj0.3mPsin.3mOferror.3sNfread.3sMplot.3xindexKdbm.3xJfclose.3sImp.3xHpkopen.3 . H.. acct.h buf.h callo.h timeb.h conf.h dir.h fblk.h file.h filsys.h ino.h inode.h map.h mount.h mpx.h stat.h tty.h pack.h types.hparam.h.3220 prim.h proc.h pwd.h reg.h param.h pk.p systm.h text.h pk.h mx.h user.h sleep((caddr_t)&gp->g_datq, TTIPRI); } /***/ trace(0x80000000, "mxread", u.u_count); while (gp->g_datq && u.u_count >= CNTLSIZ + 2) { splx(s); esc = 0; cp = nextcp(gp); if (cp==NULL) { continue; } h.index = cpx(cp); if (count = cp->c_ctlx.c_cc) { count += CNTLSIZ; if (cp->c_flags&NMBUF) count += nmsize; if (count > u.u_count) { sdata(cp); return; } esc++; } base = u.u_base; count = u.u_count; u.u_base += sizeof h; u.u_count -= sizeof h; xfr = u.. %..introxxtitleprefpermindexptxmactmac.anmacmakeptxmakeindexptxignmakemantape smallparam.h selch.h ccb.hseg.h.bakseg.h !dskmap.hu_count; if (esc && cp->c_flags&PORT) { more = mcread(cp); } else { more = (*linesw[cp->c_line].l_read)(cp->c_ttyp); } if (more > 0) sdata(cp); if (more < 0) scontrol(cp, M_CLOSE, 0); if (xfr == u.u_count) { esc++; iomove((caddr_t)m_eot, sizeof m_eot, B_READ); } /***/ trace(0x80000000, "mxread-u", u.u_count); /***/ trace(0x80000000, "mxread-x", xfr); /***/ trace(0x80000000, "mxread-e", esc); xfr -= u.u_count; if (esc) { h.count = 0; h.ccount = xfr; } else { . %..update.8makekey.8crash.8getty.8init.8cron.8boot.8tdetach.8attach.8mkboot.8lpd.8.TH DFI 1 Perkin-Elmer .SH NAME dfi \- list files on OS/MT disc .SH SYNOPSIS .BR dfi " [ " -l " ] " device [ filename ] .SH DESCRIPTION Lists the files on the specified device, which must contain a Perkin-Elmer OS/MT file system. .TP 10 .B -l Long listing - give type & size of files .TP .I filename List only filenames which match the specified name (may contain shell argument meta-characters if escaped). .I filename must be entered in uppercase! .SH AUTHOR R Miller .br University of Wollongong .SH SEE ALSO . %..ascii.7man.7ms.7term.7indexeqnchar.7hier.7 osexport(1), osimport(1) .SH BUGS Doesn't know about "Dynamic OS/MT" account numbers. h.count = xfr; h.ccount = 0; mxrstrt(cp, &cp->cx.datq, BLOCK|ALT); } if (u.u_count && (xfr&1)) { u.u_base++; u.u_count--; } copyout((caddr_t)&h, base, sizeof h); s = spl6(); } } mxwrite(dev) { register struct chan *cp; struct wh h; struct group *gp; int ucount, esc, fmp, burpcount; caddr_t ubase, hbase; if ((gp=getmpx(dev))==NULL) { u.u_error = ENXIO; return; } FP = getf(u.u_arg[0]); fmp = FP->f_flag & FMP; if (fmp != FMP) { mswrite(fmp, FP->f_un.f_chan); return; . %..indexarithmetic.6backgammon.6chess.6words.6quiz.6wump.6banner.6ching.6.TH FR 1 local .SH NAME fr \- make fixed-length records .SH SYNOPSIS .B fr [ recl ] .SH DESCRIPTION .I Fr is a filter which reads a UNIX text file from its standard input, and writes it as "fixed length records" by expanding tabs to blanks, deleting newlines, and blank-padding or truncating lines to .I recl bytes (default 80). .SH SEE ALSO vr(1) } burpcount = 0; while (u.u_count >= sizeof h) { hbase = u.u_base; iomove((caddr_t)&h, sizeof h, B_WRITE); if (u.u_error) return; esc = 0; if (h.count==0) { esc++; h.count = h.ccount; } cp = xcp(gp, h.index); if (cp==NULL) { continue; } ucount = u.u_count; ubase = u.u_base; u.u_count = h.count; u.u_base = h.data; if (esc==0) { struct tty *tp; caddr_t waddr; int line; if (cp->c_flags&PORT) { line = cp->c_line; tp = cp->c_ttyp; } else { \.t..[africaZamericaYareasXarithWasiaVbabiesUbardTchineseScollectivesRedQelementsPeuropeOgreekNincaMindexLlatinKlocomotiveJmidearthImorseHmurdersGpoetryFposnegEpresDprovinceCseq-easy seq-hard sexessovspellstate.TH OSIMPORT 1 Perkin-Elmer .SH NAME osimport \- copy a file from an OS/MT disc .SH SYNOPSIS .B osimport device file [ outfile ] .SH DESCRIPTION Reads the specified file from the device, which must contain a Perkin-Elmer OS/MT file system, and copies it onto .I outfile (if given) or to the standard output. .I Osimport translates the filename to uppercase before searching the OS directory. .SH AUTHOR R Miller .br University of Wollongong .SH SEE ALSO dfi(1), osexport(1) .SH BUGS Can only read INDEXED and COline = cp->c_oline; tp = cp->c_ottyp; } loop: waddr = (caddr_t)(*linesw[line].l_write)(tp); if (u.u_count) { if (gp->g_state&ENAMSG) { burpcount++; cp->c_flags |= BLKMSG; /* scontrol(cp, M_BLK, u.u_count); */ h.ccount = -1; h.count = u.u_count; h.data = u.u_base; copyout((caddr_t)&h, hbase, sizeof h); } else { if (waddr==0) { u.u_error = ENXIO; return; } sleep(waddr, TTOPRI); goto loop; } } } else mxwcontrotrekuccNTIGUOUS files. .br Doesn't know about "Dynamic OS/MT" account numbers. l(cp); u.u_count = ucount; u.u_base = ubase; } u.u_count = burpcount; } /* * Mcread and mcwrite move data on an mpx file. * Transfer addr and length is controlled by mxread/mxwrite. * Kernel-to-Kernel and other special transfers are not * yet in. */ mcread(cp) register struct chan *cp; { register struct clist *q; register char *np; int cc; q = (cp->c_ctlx.c_cc) ? &cp->c_ctlx : &cp->cx.datq; cc = mxmove(q, B_READ); /***/ trace(0x80000000, "mcread", cc); if (cp->c_flags&NMBUF && q == &cp-r.t..qfortunes***************************************************************** * * * UNIX First-level Interrupt Handler * * * * Perkin-Elmer 7/32, 8/32, 3220, 3240 * * * ***************************************************************** extrn trap extrn kisa,uisa extrn runrun extrn u * PSW bit definitions ps.flm equ y'40000' floating-point masked (3200) ps.iip equ y'20000' interruptible instruction in progress (3200) ps.wait equ x'8000' wait state ps.io equ x'4000' immediate interrupt ma>c_ctlx) { np = mxnmbuf; while (nmsize--) passc(*np++); cp->c_flags &= ~NMBUF; prele(mpxip); } if (cp->c_flags&PORT) return(cp->c_ctlx.c_cc + cp->c_ttyp->t_rawq.c_cc); else return(cp->c_ctlx.c_cc + cp->cx.datq.c_cc); } char * mcwrite(cp) register struct chan *cp; { register struct clist *q; register cc; int s; q = &cp->cy.datq; /***/ trace(0x80000000, "mcwrite", u.u_count); while (u.u_count) { s = spl6(); if (q->c_cc > HIQ || (cp->c_flags&EOTMARK)) { cp->c_flags |= SIGBLK; st...sfortunerlibcnofish`chess$phxlhangmanmazemooiwordsreversitttttt.kewumpdarithmeticcwords1bchingabackgammonbcd_quiz^bannerppt\quiz.kching.dsk ps.mm equ x'2000' machine malfunction interrupt mask ps.af equ x'1000' arith fault interrupt mask ps.il equ x'0800' multi level interrupts (8/32 & 3200) ps.rp equ x'0400' memory relocation / protection ps.sq equ x'0200' system queue service mask ps.prot equ x'0100' protect mode ps.ureg equ x'00f0' user register set * PSW definitions ps.user equ ps.io+ps.mm+ps.af+ps.rp+ps.prot+ps.ureg ps.idle equ ps.wait+ps.io+ps.mm+ps.af+ps.rp+ps.ureg ps.kern equ ps.io+ps.mm+ps.af+ps.rp+ps.ureg ps.disb equ ps.mmplx(s); break; } splx(s); cc = mxmove(q, B_WRITE); } wakeup((caddr_t)q); return((caddr_t)q); } /* * Msread and mswrite move bytes * between user and non-multiplexed channel. */ msread(fmp, cp) register struct chan *cp; { register struct clist *q; int s; q = (fmp&FMPX) ? &cp->cx.datq : &cp->cy.datq; s = spl6(); while (q->c_cc == 0) { if (cp->c_flags & EOTMARK) { cp->c_flags &= ~EOTMARK; if (cp->c_flags&ENAMSG) scontrol(cp, M_UBLK, 0); else { wakeup((caddr_t)cp); wav...+ps.af+ps.rp+ps.ureg ps.trap equ ps.mm+ps.af * Register definitions r0 equ 0 r1 equ 1 r2 equ 2 r3 equ 3 r4 equ 4 r5 equ 5 r6 equ 6 r7 equ 7 r8 equ 8 r9 equ 9 ra equ 10 rb equ 11 rc equ 12 rd equ 13 re equ 14 rf equ 15 sp equ r7 ***************************************************************** * * * call: interface to C interrupt handlers * * * * re-rf - old PSW * * rd - current (interrupt) PSW status * * rc - interrupt routine address * * rb - interrupt routine PSW status * * r3 keup((caddr_t)q); } goto out; } if (cp->c_flags&WCLOSE) { u.u_error = ENXIO; goto out; } sleep((caddr_t)q,TTIPRI); } splx(s); /***/ trace(0x80000000, "mcread", q->c_cc); while (mxmove(q, B_READ) > 0) ; mxrstrt(cp, q, SIGBLK); return; out: splx(s); } mswrite(fmp, cp) register struct chan *cp; { register struct clist *q; register int cc; q = (fmp&FMPX) ? &cp->cy.datq : &cp->cx.datq; /***/ trace(0x80000000, "mcwrite", u.u_count); while (u.u_count) { spl6(); if (cp->c_flagsw...- device status ( or SVC arg address ) * * r2 - device address ( or trap code ) * * * ***************************************************************** pure entry call call equ * ifnz PIC bal r6,rdpic get last pic timing interval endc * if trap from user mode, switch to kernel address space thi re,ps.prot user mode? bz kernel no - kernel already ifnz PIC am r5,utime add new interval to user time endc l r1,kisa kernel seg regs bal r6,addrsw switch address space b nk&WCLOSE) { bad: signal(SIGPIPE, cp->c_pgrp); return; } while (q->c_cc>100) { if (cp->c_flags&WCLOSE) goto bad; sdata(cp); cp->c_flags |= BLOCK; sleep((caddr_t)q+1,TTOPRI); } spl0(); cc = mxmove(q, B_WRITE); if (cc < 0) break; } if (fmp&FMPX) { if (cp->c_flags&YGRP) sdata(cp); else wakeup((caddr_t)q); } else { if (cp->c_flags&XGRP) sdata(cp); else wakeup((caddr_t)q); } } /* * move chars between clist and user space. */ mxmove(q, dir) registerx.{..bin.keyroot.keyunoticeroot.0ernel * else trap from kernel mode -- get stack pointer from register set f kernel equ * ifnz PIC thi re,ps.wait bz kernel2 not in wait am r5,itime if wait add current interval to idle time b kernel3 kernel2 am r5,sytim if kernel and not wait increment sys time kernel3 equ * endc st rd,nr.psw set up resume psw la r1,nkernel st r1,nr.psw+adc lr r1,rd current psw ohi r1,ps.ureg switch to reg set f epsr r0,r1 st sp,ksp save stack pointer lpsw nr.psw back to reg set 0 nkernel equ * struct clist *q; register dir; { register cc; char buf[HIQ]; cc = MIN(u.u_count, sizeof buf); /***/ trace(0x80000000, "mxmove", cc); if (dir == B_READ) cc = q_to_b(q, buf, cc); if (cc <= 0) return(cc); iomove((caddr_t)buf, cc, dir); if (dir == B_WRITE) cc = b_to_q(buf, cc, q); /***/ trace(0x80000000, "mxmove-r", cc); return(cc); } mxrstrt(cp, q, b) register struct chan *cp; register struct clist *q; register b; { int s; s = spl6(); /***/ trace(0x80000000, "mxrstrt", 0); if (cp->c_flags&z.{..rootdmr* enable memory relocation / protection ohi rd,ps.rp enable relocation epsr r0,rd * if stack pointer is out of range, set it to top of u area and force a panic l sp,ksp get kernel stack pointer ci sp,u below bottom of u area? bl badsp c sp,maxsp above top of u area? bnp goodsp badsp l sp,maxsp set to top of u area la rc,stkovflo force a panic goodsp equ * ifnz M3200 * save microcode scratchpad registers if necessary (3200 only) ti re,ps.iip interruptible instruction in progress? bz nsib && q->c_ccc_flags &= ~b; if (b&ALT) wakeup((caddr_t)q+1); else mcstart(cp, (caddr_t)q); } if (cp->c_flags&WFLUSH) wakeup((caddr_t)q+2); splx(s); } /* * called from driver start or xint routines * to wakeup output sleeper. */ mcstart(cp, q) register struct chan *cp; register caddr_t q; { if (cp->c_flags&(BLKMSG)) { cp->c_flags &= ~BLKMSG; scontrol(cp, M_UBLK, 0); } else wakeup((caddr_t)q); } mxwcontrol(cp) register struct chan *cp; { short cmd[2]; int s; iomove{...zmailxsecretmaildpd &atdlpdip no - skip shi sp,16*adc space on stack for scratchpad regs psf 5,0(sp) save scratchpad regs nsiip equ * endc * save psw & status on kernel stack shi sp,14*adc space for 14 words stm re,11*adc(sp) save old psw st rb,13*adc(sp) save new psw st r2,0(sp) save dev code st r3,adc(sp) save status * switch to user register set, and save regs st rc,nr.intp save routine address st sp,ksp save stack pointer ohi rd,ps.ureg switch to user regs epsr r0,rd stm r0,nr.regs save all regs l sp,((caddr_t)cmd, sizeof cmd, B_WRITE); switch(cmd[0]) { /* * not ready to queue this up yet. */ case M_EOT: s = spl6(); while (cp->c_flags & EOTMARK) if (cp->c_flags&ENAMSG) { scontrol(cp, M_BLK, 0); goto out; } else sleep((caddr_t)cp, TTOPRI); cp->c_flags |= EOTMARK; out: splx(s); break; case M_IOCTL: printf("M_IOCTL"); break; default: u.u_error = ENXIO; } } mxioctl(dev, cmd, addr, flag) caddr_t addr; { struct group *gp; int fmp; struct file *fp; if ((gp =...Ind.iaruninvInd.ibInd.ic~Rv7manksp restore stack pointer lm r8,nr.regs stack regs r0-sp stm r8,2*adc(sp) * reload user high regs ( to be saved by standard c linkage ) * and call c trap handler lm r8,8*adc+nr.regs restore regs r8-rf st rf,10*adc(sp) stack link reg l r1,nr.intp trap routine address l r0,13*adc(sp) new psw epsr r2,r0 balr rf,r1 call trap routine * on return from trap routine, check whether higher-priority process * is now ready to run l r1,11*adc(sp) old psw thi r1,ps.prot user mode ? bz noswtch no - don' getmpx(dev)) == NULL) { bad: u.u_error = ENXIO; return; } fp = getf(u.u_arg[0]); if (fp==NULL) goto bad; fmp = fp->f_flag & FMP; if (fmp == FMP) { switch(cmd) { case MXLSTN: if (mpxip == NULL) { mpxip = gp->g_inode; } else goto bad; break; case MXNBLK: gp->g_state |= ENAMSG; break; default: goto bad; } } else { struct { short cntl[2]; struct ttiocb iocb; } vec; register struct chan *cp; register int s; vec.cntl[0] = M_IOCTL; vec.cntl[1%d %s )9IYiyIYi.TH MOUNT 2 .SH NAME mount, umount \- mount or remove file system .SH SYNOPSIS .B mount(special, name, rwflag) .br .B char *special, *name; .PP .B umount(special) .br .B char *special; .SH DESCRIPTION .I Mount announces to the system that a removable file system has been mounted on the block-structured special file .I special; from now on, references to file .I name will refer to the root file on the newly mounted file system. .I Special and .I name are pointers to null-terminated strings containing the ap] = cmd; if (copyin(addr, (caddr_t)&vec.iocb, sizeof(vec.iocb))) { u.u_error = EFAULT; return; } cp = fp->f_un.f_chan; s = spl6(); if (sdata(cp) == NULL) { splx(s); return; } b_to_q((caddr_t)&vec, sizeof(vec), &cp->c_ctlx); splx(s); } } chdrain(cp) register struct chan *cp; { register struct tty *tp; int wflag; chwake(cp); wflag = (cp->c_flags&WCLOSE)==0; tp = cp->c_ttyp; if (tp == NULL) /* prob not required */ return; if (cp->c_flags&PORT && tp->t_chan == cp) { 9Yy9propriate path names. .PP .I Name must exist already. .I Name must be a directory (unless the root of the mounted file system is not a directory). Its old contents are inaccessible while the file system is mounted. .PP The .I rwflag argument determines whether the file system can be written on; if it is 0 writing is allowed, if non-zero no writing is done. Physically write-protected and magnetic tape file systems must be mounted read-only or errors will occur when access times are updated, whether or not acp->c_ttyp = NULL; tp->t_chan = NULL; return; } if (wflag) wflush(cp,&cp->cx.datq); else flush(&cp->cx.datq); if (!(cp->c_flags&YGRP)) { flush(&cp->cy.datq); } } chwake(cp) register struct chan *cp; { register char *p; wakeup((caddr_t)cp); flush(&cp->c_ctlx); p = (char *)&cp->cx.datq; wakeup((caddr_t)p); wakeup((caddr_t)++p); wakeup((caddr_t)++p); p = (char *)&cp->cy.datq; wakeup((caddr_t)p); wakeup((caddr_t)++p); wakeup((caddr_t)++p); } chfree(cp) register struct chan *cp; { regist)Y)Yny explicit write is attempted. .PP .I Umount announces to the system that the .I special file is no longer to contain a removable file system. The associated file reverts to its ordinary interpretation. .SH "SEE ALSO" mount(1) .SH DIAGNOSTICS .I Mount returns 0 if the action occurred; \-1 if .I special is inaccessible or not an appropriate file; if .I name does not exist; if .I special is already mounted; if .I name is in use; or if there are already too many file systems mounted. .PP .I Umount returns 0 ier struct group *gp; register i; gp = cp->c_group; if (gp==NULL) return; i = cp->c_index; if (cp == gp->g_chans[i]) { gp->g_chans[i] = NULL; } cp->c_group = NULL; } flush(q) register struct clist *q; { while(q->c_cc) getc(q); } wflush(cp,q) register struct chan *cp; register struct clist *q; { register s; s = spl6(); while(q->c_cc) { if (cp->c_flags & WCLOSE) { flush(q); goto out; } cp->c_flags |= WFLUSH; sdata(cp); sleep((caddr_t)q+2,TTOPRI); } out: cp->c_flags &= ~W)Y)f the action occurred; \-1 if if the special file is inaccessible or does not have a mounted file system, or if there are active files in the mounted file system. .SH ASSEMBLER (mount = 21.) .br .B sys mount; special; name; rwflag .PP (umount = 22.) .br .B sys umount; special FLUSH; splx(s); } scontrol(cp,event,value) register struct chan *cp; short event,value; { register struct clist *q; int s; trace(0x80000000, "scontrol", event); q = &cp->c_ctlx; s = spl6(); if (sdata(cp) == NULL) return; putw(event,q); putw(value,q); splx(s); } sdata(cp) register struct chan *cp; { register struct group *gp; register short x; register struct group *lgp; int s; gp = cp->c_group; if (gp==NULL) { return(0); } x = cp->c_index; s = spl6(); while (gp) { if ((gp->g_state&)Y.TH KILL 2 .SH NAME kill \- send signal to a process .SH SYNOPSIS .B kill(pid, sig); .SH DESCRIPTION .I Kill sends the signal .I sig to the process specified by the process number in r0. See .IR signal (2) for a list of signals. .PP The sending and receiving processes must have the same effective user ID, otherwise this call is restricted to the super-user. .PP If the process number is 0, the signal is sent to all other processes in the sender's process group; see .IR tty (4). .PP If the process number iISGRP)==0) { return(0); } gp->g_datq |= cmask[x]; x = gp->g_index; lgp = gp; gp = gp->g_group; } gp = lgp; splx(s); wakeup((caddr_t)&gp->g_datq); return((int)gp); } struct chan * xcp(gp, x) register struct group *gp; register short x; { register i; i = 0; /***/ while (ig_state&ISGRP) { gp = (struct group *)gp->g_chans[x&017]; x >>= 4; if ((x&017) >= NINDEX) break; i++; } return((struct chan *)gp); } cpx(cp) register struct chan *cp; { registe))))s \-1, and the user is the super-user, the signal is broadcast universally except to processes 0 and 1, the scheduler and initialization processes, see .IR init (8). .PP Processes may send signals to themselves. .SH "SEE ALSO" signal(2), kill(1) .SH DIAGNOSTICS Zero is returned if the process is killed; \-1 is returned if the process does not have the same effective user ID and the user is not super-user, or if the process does not exist. .SH ASSEMBLER (kill = 37.) .br (process number in r0) .br .B sys killr x; register struct group *gp; if (cp==NULL) return(-1); x = (-1<<4) + cp->c_index; gp = cp->c_group; if (gp==NULL || (gp->g_state&ISGRP)==0) return(-1); gp = gp->g_group; while (gp && gp->g_state&ISGRP) { x <<= 4; x |= gp->g_index; gp = gp->g_group; } return(x); } struct chan * nextcp(gp) register struct group *gp; { if (gp->g_datq == 0) { gp = NULL; goto out; } while (gp != NULL && gp->g_state&ISGRP) { while ( (gp->g_datq & gp->g_rotmask) == 0) { gp->g_rot++; gp->g_)); sig rot &= 017; if (gp->g_rot) gp->g_rotmask <<= 1; else gp->g_rotmask = 1; } gp = (struct group *)gp->g_chans[gp->g_rot]; } if (gp) rmdata(gp); out: return((struct chan *)gp); } rmdata(cp) register struct chan *cp; { register struct group *gp; register short x; gp = cp->c_group; x = cp->c_index; while (gp) { gp->g_datq &= ~cmask[x]; if (gp->g_datq) return; x = gp->g_index; gp = gp->g_group; } } mcrint(c, tp) struct tty *tp; { } mcxint(tp) struct tty *tp; { } /* prstuhrd_ed"cursor getn recpos elist errno fatal curunit cf fseek fmtbuf _iob fprintf abort rd_I"rd_L" rd_A.TH CHOWN 2 .SH NAME chown \- change owner and group of a file .SH SYNOPSIS .B chown(name, owner, group) .br .B char *name; .SH DESCRIPTION The file whose name is given by the null-terminated string pointed to by .I name has its .I owner and .I group changed as specified. Only the super-user may execute this call, because if users were able to give files away, they could defeat the (nonexistent) file-space accounting procedures. .SH "SEE ALSO" chown(1), passwd(5) .SH DIAGNOSTICS Zero is returned if the owff(s,cc) register char *s; register cc; { while (cc--) printf("%o ",*s++&0377); } prascii(s, cc) register char *s; register cc; { register c; while (cc--) { c = *s++; if (c>=040 && c<=0176) putchar(c); else printf(" %o ", c&0377); } } */ " rd_AW" .rd_F"clearerr rd_ned"rd_POS" rd_H" zdonewrec cblank scale fltused sue.ok x p,Ї X@!4A@$PX,PAP#5XC$P@$P@X@X$#9X@PA@'xX@P $P$P@PA@&xC0X@ C0>X@$P X,X#7%P@C@P%PA@%CPX@PA@X,X#9X@P@C@Pner is changed; \-1 is returned on illegal owner changes. .SH ASSEMBLER (chown = 16.) .br .B sys chown; name; owner; group .TH WAIT 2 .SH NAME wait \- wait for process to terminate .SH SYNOPSIS .B wait(status) .br .B int *status; .PP .B wait(0) .SH DESCRIPTION .I Wait causes its caller to delay until a signal is received or one of its child processes terminates. If any child has died since the last .I wait, return is immediate; if there are no children, return is immediate with the error bit set (resp. with a value of \-1 returned). The normal return yields the process ID of the terminated child. In the case of several childreX@PA@X@#$#ю p,p,Ї X@!4A@$PX,PAP#5XCf$P@$P@X@X$!9X@PA@X@PA@P@'t$P$PX@PA@&t$#ю p,p(ЇX(X #X(XC8X(X#8eP@C@PePA@eCN$P@P@$P@X(X,P@X(P@X@XB0h'xX(XP $P$PX,PA@&xC08X(X#8rP@C@PrPA@rCX@XP@X@XC08X(X.TH CHMOD 2 .SH NAME chmod \- change mode of file .SH SYNOPSIS .B chmod(name, mode) .br .B char *name; .SH DESCRIPTION The file whose name is given as the null-terminated string pointed to by .I name has its mode changed to .IR mode . Modes are constructed by ORing together some combination of the following: .PP .RS 04000 set user ID on execution 02000 set group ID on execution 01000 save text image after execution 00400 read by owner 00200 write by owner 00100 execute (search on directory) by owner n several .I wait calls are needed to learn of all the deaths. .PP If .RI (int) status is nonzero, the high byte of the word pointed to receives the low byte of the argument of .I exit when the child terminated. The low byte receives the termination status of the process. See .IR signal (2) for a list of termination statuses (signals); 0 status indicates normal termination. A special status (0177) is returned for a stopped process which has not terminated and can be restarted. See .IR ptrace (2). If the 020#8gP@C@PgPA@gCHX@XB06X(X#8gP@C@PgPA@g#$#юp(p,Ї 'xX@P $P$P@PA@&xX@PA@P't$PX@PX@PA@&t'xX@P $P$P@PA@&x't$PXPX@PA@&t$#ю p,p(Ї't$PX@[@&PX@PA@&t$#юp(startstartstartiosuesuesue)9Yiy 00070 read, write, execute (search) by group 00007 read, write, execute (search) by others .RE .PP If an executable file is set up for sharing (\fB\-n\fR or \fB\-i\fR option of .IR ld (1)) then mode 1000 prevents the system from abandoning the swap-space image of the program-text portion of the file when its last user terminates. Thus when the next user of the file executes it, the text need not be read from the file system but can simply be swapped in, saving time. Ability to set this bit is restricted t0 bit of the termination status is set, a core image of the process was produced by the system. .PP If the parent process terminates without waiting on its children, the initialization process (process ID = 1) inherits the children. .SH "SEE ALSO" exit(2), fork(2), signal(2) .SH DIAGNOSTICS Returns \-1 if there are no children not previously waited for. .SH ASSEMBLER (wait = 7.) .br .B sys wait .br (process ID in r0) .br (status in r1) .PP The high byte of the status is the low byte of r0 in the child at tyy)9Yyy )9o the super-user since swap space is consumed by the images; it is only worth while for heavily used commands. .PP Only the owner of a file (or the super-user) may change the mode. Only the super-user can set the 1000 mode. .SH "SEE ALSO" chmod(1) .SH DIAGNOSTIC Zero is returned if the mode is changed; \-1 is returned if .I name cannot be found or if current user is neither the owner of the file nor the super-user. .SH ASSEMBLER (chmod = 15.) .br .B sys chmod; name; mode ermination. IYiyyyyyy).TH ACCT 2 .SH NAME acct \- turn accounting on or off .SH SYNOPSIS .B acct(file) .br .B char *file; .SH DESCRIPTION The system is prepared to write a record in an accounting .I file for each process as it terminates. This call, with a null-terminated string naming an existing file as argument, turns on accounting; records for each terminating process are appended to .IR file . An argument of 0 causes accounting to be turned off. .PP The accounting file format is given in .IR acct (5). .SH "SEE ALSO" acct(5.TH UNLINK 2 .SH NAME unlink \- remove directory entry .SH SYNOPSIS .B unlink(name) .br .B char *name; .SH DESCRIPTION .I Name points to a null-terminated string. .I Unlink removes the entry for the file pointed to by .I name from its directory. If this entry was the last link to the file, the contents of the file are freed and the file is destroyed. If, however, the file was open in any process, the actual destruction is delayed until it is closed, even though the directory entry has disappeared. .SH "SEE)i)recloc$s_rsue"init f_init c_sue"reading recpos curunit nowreadi cf reclen fread errno fatal clearerr s_wsue"Bnowwriti ftell fseek sequenti external formatte units elist fk_o), sa(1) .SH DIAGNOSTICS On error \-1 is returned. The file must exist and the call may be exercised only by the super-user. It is erroneous to try to turn on accounting when it is already on. .SH BUGS No accounting is produced for programs running when a crash occurs. In particular nonterminating programs are never accounted for. .SH ASSEMBLER (acct = 51.) .br .B sys acct; file ALSO" rm(1), link(2) .SH DIAGNOSTICS Zero is normally returned; \-1 indicates that the file does not exist, that its directory cannot be written, or that the file contains pure procedure text that is currently in use. Write permission is not required on the file itself. It is also illegal to unlink a directory (except for the super-user). .SH ASSEMBLER (unlink = 10.) .br .B sys unlink; name pen e_wsue"fwrite e_rsue"fuio.okp(ЇX@C0X(X\0Q@X@Y@C :X@X#8nP@C@PnPA@nC'xX@P X(XPX0PX,PA@&x$CJCFX(X\0Q@'xX@P X(XPX0PX,PA@&x$#юp(p(ЇX@C0$'tX0PX,PX(PA&tC"'tX0PX,PX(PA&t#юp(p(ЇX(X\0Q@X@X Y@.TH TCAT 1 .SH NAME tcat \- Tektronix photypesetter simulator .SH SYNOPSIS .B tcat [ .B \-t ] [ .B \-s\c N ] [ .B \-p\c L ] [ file ] .SH DESCRIPTION .I Tcat interprets its input (standard input default) as device codes for a Graphic Systems phototypesetter (cat). The standard output of .I tc is intended for a Tektronix 4015 (a 4014 teminal with ASCII and APL character sets). The sixteen typesetter sizes are mapped into the 4014's four sizes; the entire TROFF character set is drawn using the 4014's characte.TH UMASK 2 .SH NAME umask \- set file creation mode mask .SH SYNOPSIS .B umask(complmode) .SH DESCRIPTION .I Umask sets a mask used whenever a file is created by .IR creat (2) or .IR mknod (2): the actual mode (see .IR chmod (2)) of the newly-created file is the logical .B and of the given mode and the complement of the argument. Only the low-order 9 bits of the mask (the protection bits) participate. In other words, the mask shows the bits to be turned off when files are created. .PP The previous value ofCLX@X C0:X@X#8nP@C@PnPA@nCX@C0'xX@P X(XPX0PX,PA@&xX(YC0BX@X#9X@P@C@PX@PA@X@C<#$C4'xX@P X(XPX0PX,PA@&x$#юp(eof/uioeof/uioeof/uio)99IYiyyr generator, using overstruck combinations where necessary. Typical usage: .IP "" 15 troff \-t file | tcat .PP At the end of each page .I tcat waits for a newline (empty line) from the keyboard before continuing on to the next page. In this wait state, the command .B e will suppress the screen erase before the next page; .B s\c N will cause the next N pages to be skipped; and .B !\c line will send line to the shell. .PP The command line options are: .TP .B \-t Don't wait between pages; for directing output the mask is returned by the call. The value is initially 0 (no restrictions). The mask is inherited by child processes. .SH SEE ALSO creat(2), mknod(2), chmod(2) .SH ASSEMBLER (umask = 60.) .br .B sys umask; complmode 99IYi)yIYYYiYyreclen into a file. .TP .BR \-s N Skip the first N pages. .TP .BR \-p L Set page length to L. L may include the scale factors .B p (points), .B i (inches), .B c (centimeters), and .B P (picas); default is picas. .TP .BI \(fm\- l\ w \(fm Multiply the default aspect ratio, 1.5, of a displayed page by .I l/w. .SH "SEE ALSO" troff(1), plot(1) .SH BUGS Font distinctions are lost. .br The aspect ratio option is unbelievable. .TH SYNC 2 .SH NAME sync \- update super-block .SH SYNOPSIS .B sync( ) .SH DESCRIPTION .I Sync causes all information in core memory that should be on disk to be written out. This includes modified super blocks, modified i-nodes, and delayed block I/O. .PP It should be used by programs which examine a file system, for example .I "icheck, df," etc. It is mandatory before a boot. .SH "SEE ALSO" sync(1), update(8) .SH BUGS The writing, although scheduled, is not necessarily complete upon return from .IR sync$do_us"reading recpos elist errno fatal cf fread fwrite do_uio"sequenti do_ud"^curunit wsfe.ok*  `p,Ї X@!4A@$PX,PA@P#5XCD$P@$P@$P@$P@X,P@$P@P@$P@X,X P@X,X,P@X@PA@C8X,X#8dP@C@PdPA@ <'xXP PX#3&"&PP@$A@@PA@Xp0Ї@ZP@PPA@ lP@(B0&@\P@|PA@p$PA@X0C X4XPA@C2't@\P$PPA@&t#7PA юp0p0ЇX0$P $P$$ C0l &CBX PX  P CBC>X  P C0X PC"$CfC6 ) X@'CXPX PA8!4$C$XC0$PX WPA#$#юp0pЇX? . .SH ASSEMBLER (sync = 36.) .br .B sys sync dCX@XP@P@@P@@P@zP@P@.P@A@$P@X@XP@X@X$!9X@PA@$#ю p,p(Ї$Q@X@%QBX(X @X&PCX@PX(PA@юp(p(Ї$Q@X( B0R$P@X@%QBX(X @X&PCX@PX(PA@CX@B0$P@X(0B0HX@%QBX @X&P$CX@P$ PA@CPX(1B0DX@%QBX @X!5PX@(PA@'tX@(PP PA@&tC0 .B0 HB0PA@PX@YB0@lP PA@$'tX@(PP PA@&tC0\ .B0. H!4$CL LB0XXP C0@lP PA@Cz$#C$#юpp(ЇX0X(%Q,C B%Q BX&P#PA@ B& #3C #Y(!4$C$ &X(#юp(p(ЇX(X, &C02%Q B X&P#P.TH STIME 2 .SH NAME stime \- set time .SH SYNOPSIS .B stime(tp) .br .B long *tp; .SH DESCRIPTION .I Stime sets the system's idea of the time and date. Time, pointed to by .I tp, is measured in seconds from 0000 GMT Jan 1, 1970. Only the super-user may use this call. .SH "SEE ALSO" date(1), time(2), ctime(3) .SH DIAGNOSTICS Zero is returned if the time was set; \-1 if user is not the super-user. .SH "ASSEMBLER (PDP11) (stime = 25.) .br (time in r0-r1) .br .B sys stime .PP .SH "ASSEMBLER (Perkin-Elmer) .nf &P$CX@P$ PA@CFX@%QBX(X @X&PCX@PX(PA@юp(p(Ї$P@$P@$ PX@A$#юp(p(Ї$ PX@A$#юp(p(ЇX@#9$ PX@A$P@#юp(startio)9IYiyh PA@ C #юp(p(ЇX(PA@V't$P$P PA@L&t$P X P #7 юp(p(Ї'tX(P0PX,PA@&tX(  #3%#$#юp(pЇXȾX C0hɐ%#6қ&CRžC *'xXP $P PPA@ 0&x$P& -!5$Q& P 0!60P&$ *B0X&&ӜC*Ӝɐ9B ɐ0B$ &CP$$Pɐ.B0P$Q&ӑɐ*B0X&&ӜC*ɐ9B "ɐstime equ 25 l 0,time svc 0,stime .fi )IYiy ))))9)))9)))9)0B$ &ӜCPȾ C'|PXP XPPh `&A@ &|CX &#4қ& PCrX& C0 #3&" PCLX&'C'|$ P$P XPʰ PX P&A&|C '|$ P$P XPʰ PX P&A&|C'|$P$P XPʰ PX P&AT&|C'|$P$P XPʰ PX P&A &|Cp'|P$P XPʰ PX P&A&|C:'|P$P XPʰ PX P&A&|C'|$ P$P.TH SETUID 2 .SH NAME setuid, setgid \- set user and group ID .SH SYNOPSIS .B setuid(uid) .PP .B setgid(gid) .SH DESCRIPTION The user ID (group ID) of the current process is set to the argument. Both the effective and the real ID are set. These calls are only permitted to the super-user or if the argument is the real ID. .SH "SEE ALSO" getuid(2) .SH DIAGNOSTICS Zero is returned if the user (group) ID is set; \-1 is returned otherwise. .SH ASSEMBLER (setuid = 23.) .br (user ID in r0) .br .B sys setuid .PP ())9)))9IIYIYs_wsfe"init f_init c_sfe reading sequenti formatte external elist recpos cursor scale fmtbuf unit XPʰ PX P&A&|C'|$ P$P XPʰ PX P&AL&|C& CH'|$ P$P XPʰ PX P&A&|C.'|$P$P XPʰ PX P&A&|C'|P$P XPʰ PX P&A&|C'|$ P$P XPʰ PX P&Ap&|CɐlB04'|$ P$P XPʰ PX P&A4&|C0'|$ P$P XPʰ PX P&A&|'CC@pP@&U 3XC, #4қ&CC@P@&U 3XD setgid = 46.) .br (group ID in r0) .br .B sys setgid s curunit pars_f errno fatal cf x_putc"putn w_ed doed w_ned doned xw_end"doend xw_rev"dorevert x_wSL"jdonewrec fmt_bg cplus cblank nowwriti _flsbuf pr_put"workdone sfe.ok p,Ї A@P$P@X#ю p,p,Ї XsB0X#8Y#%X [#"$X#4 '|XPXP P PPA@ 0&|Ⱦ&CžC *'xXP $P PPA@ 0&xюpp(ЇX(X,X4X8 #7 # #'$ @$ $ B0X0C0 #6'0  C0 #'-  #юp(p(ЇX,? $ юp(p(ЇX(X,X4X0C -B0FX80B0:%Q B X&P&CP P&A@ '%Q BX8X&P# PX8PA@ $Q0Cj'B.TH READ 2 .SH NAME read \- read from file .SH SYNOPSIS .B read(fildes, buffer, nbytes) .br .B char *buffer; .SH DESCRIPTION A file descriptor is a word returned from a successful .I "open, creat, dup," or .I pipe call. .I Buffer is the location of .I nbytes contiguous bytes into which the input will be placed. It is not guaranteed that all .I nbytes bytes will be read; for example if the file refers to a typewriter at most one line will be returned. In any event the number of characters read is returned. ,X #X,XC8X,X#8eP@C@PePA@eCX,X,PXXB0h'xX,XP $P$PX0PA@&xC08X,X#8rP@C@PrPA@rCFXXB06X,X#8fP@C@PfPA@f#$#ю p,p(ЇA#юp(startiosfesfe)IYix<%Q B X&P&CP P&A@ CX0C0<%Q BX8X&P# PX8PA@ %Q0Cюp(p(Ї'tA@LPX,PX(PA@&t#юp(p(ЇX( #7  #6 @#4%CX B0N #: ,P CPA@@P !9  C  X P 't #5$P#PX P PA@&tP %Q CHX B0$  #7 # $P %CX&P.PP If the returned value is 0, then end-of-file has been reached. .SH "SEE ALSO" open(2), creat(2), dup(2), pipe(2) .SH DIAGNOSTICS As mentioned, 0 is returned when the end of the file has been reached. If the read was otherwise unsuccessful the return value is \-1. Many conditions can generate an error: physical I/O errors, bad buffer address, preposterous .I nbytes, file descriptor not that of an input file. .SH ASSEMBLER (read = 3.) .br (file descriptor in r0) .br .B sys read; buffer; nbytes .br (byte cyIYIYe_rsfe"en_fio fmtbuf c_sfe",errno fatal units fk_open e_wsfe"dfmt.oj*8(Pp(Ї$P@&P@&P@&$PX(PAP(!3%#$#юp(p#юp(p,Ї X0 C0  C04X,$'tPP PA@<&t$P CXB0lB0<@yPA@(#9  C@@P @@P CrPA@@ P !9  CH  $C,X C P'tPP PA@<&tP X, &P C0 %#X,#ю p,p(ЇX( B0PXC0HX C 'x$P XPXPX !6P#PA&xCZ$QDPXDPADPD'xXP XPXPX !6P#PAb&xC $PPXDPAPDXC0'x$P $PXP PA&xC$P##C.Y@L!5@#6$CCX@T&P@T!#CP@T$PA@X@T  #$CX@TPA@!4$CX@LPX@L& C0X@LXX @LPX@T 'P P@L@@X@LPC  P@HU@HC X@HXP@PX X@HPX@HP  &#юp(p(ЇX('P@HX P юp(p4ЇX4$T @#5PAX @ PX8PA #3 !4 C~PP X8&U#PX'PC0$X&PXX. ult gap is 3 characters. .TP .BR \-o " only" Use as keywords only the words given in the \fIonly\fR file. .TP .BR \-i " ignore" Do not use as keywords any words given in the .I ignore file. If the \fB-\fIi\fR and \fB-\fIo\fR options are missing, use /usr/lib/eign as the .I ignore file. .TP .BR \-b " break" Use the characters in the .I break file to separate words. In any case, tab, newline, and space characters are always used as break characters. .TP .BR \-r Take any leading nonblank characters of eacPXDPAPDXC0'x$P $PXPPA&xC$PXD !5$QD" XD0BZXD9B HPXDPAPDXC0"'x$P $PXPPA<&xC'x$P $P$PPA&xC$PPXDPAPDXC0XD.B0 $QDPXDPAbPD#$P'x$P XPXPPA&xCL$PPXDPAPDXC0&XD.B0 $QDPXDPAPD#$P'x$P XPXPPA&P PCC$   BX@P   P #юp4p0ЇPX0PA@#$#$#юp0p(Ї'tX,Pt PX(PA@&t#юp(p(Ї'tX,PtPX(PA@&t#юp(X!$P@ %XP@XP@!P@ %XP@XP@XP@!P@ %XP@XP@X!P@ %XP@XP@!P@ %XP@XP@X!P@ %XP@h input line to be a reference identifier (as to a page or chapter) separate from the text of the line. Attach that identifier as a 5th field on each output line. .PP The index for this manual was generated using .I ptx. .SH FILES /bin/sort .br /usr/lib/eign .SH BUGS Line length counts do not account for overstriking or proportional spacing. .br &xC$PPXDPAPDXC0XD.C0&'x$P $PXP$PA&xCf$QDPXDPA,PD'x$P XPXP$ PAb&xC CaB BX@XB0%Q@&XXHP$CXDXHP$#ю$pDp,Ї X@& PX@&,B.'tX@P@P@ PA@&tA@X,XPX0XPX4XPX8XP X@&&P@&#ю p,p4Ї$P$P X4 !6$Q4C:9B @0B4X$ BBX@ P@X@X? P@ !X@ZP@P@ %XP@XP@X!P@ % 8<J?.(=/8;7&<>!-#10: +5 '9%)"6 42 $ , 3*hexagramsrCan't find hexagrams douxFz DLOUXcdefglorsux.TH PTRACE 2 .SH NAME ptrace \- process trace .SH SYNOPSIS #include .PP .B ptrace(request, pid, addr, data) .br .B int *addr; .SH DESCRIPTION .I Ptrace provides a means by which a parent process may control the execution of a child process, and examine and change its core image. Its primary use is for the implementation of breakpoint debugging. There are four arguments whose interpretation depends on a .I request argument. Generally, .I pid is the process ID of the traced process, which must b. P$Q $Q4X4CX !7X8$P#XX8PX4#юp4p,Ї $P't$P$PPA&t#ю p,p4Ї$PX4XYC X@& PXPAC8'xX@P XXP@P@ PA@&xX@X#8dP@C@PdPA@dCX8PXPX@A#7$Q@&CD$Q@&CX@'<X@&B %Q@'<$Q@&CX8!8X@ACX@'<%Q@&$P@'D'tXfmtbuf _iob fprintf abort cnt$&ret$'cp$' !fi.diff" .PP will get the f1 files from the usg and pwba machines, execclosed in braces may be used instead. Tilde ~ represents a full space in the output, circumflex ^ half as much. .PP .vs 13p Subscripts and superscripts are produced with the keywords .B sub and .B sup. Thus .I "x sub i" makes $x sub i$, .I "a sub i sup 2" produces $a sub i sup 2$, and .I "e sup {x sup 2 + y sup 2}" gives $e sup {x sup 2 + y sup 2}$. .PP Fractions are made with .BR over : .I "a over b" yields $a over b$. .PP .B sqrt makes square roots: .I "1 over sqrt {ax sup 2 +bx+c}" results in $1 over sPXC0X&PPACюp8p(ЇX@&PB$ PA$P@$P(PA@юp(p,Ї X@Z0PB$ PA$P@ PA$PXY0C"X,&P,PAX$QCю p,p(Їh@0i(B `h@4i(C RX@& PB$ PA$P@$P@'x$P $P$ P(PA@&xCPX@PB$ PA$P@'|$P$P $ PP(PA@&|юp(p(ЇX@PB$ PAL$P@ Pute a .I diff command and put the results in f1.diff in the local directory. .PP Any special shell characters such as <>;| should be quoted either by quoting the entire command-string, or quoting the special characters as individual arguments. .SH FILES /usr/uucp/spool - spool directory .br /usr/uucp/* - other data and programs .SH SEE ALSO uucp(1) .br D. A. Nowitz, .I Uucp implementation description .SH WARNING An installation may, and for security reasons generally will, limit the list of commands executaqrt {ax sup 2 +bx+c}$ . .PP The keywords .B from and .B to introduce lower and upper limits on arbitrary things: $lim from {n-> inf} sum from 0 to n x sub i$ is made with .I "lim from {n\-> inf } sum from 0 to n x sub i." .PP Left and right brackets, braces, etc., of the right height are made with .B left and .B right: .I "left [ x sup 2 + y sup 2 over alpha right ] ~=~1" produces $left [ x sup 2 + y sup 2 over alpha right ] ~=~1$. The .B right clause is optional. Legal characters after .B left and .B righA8(PA,h(`Ah,`A)PAюp(p@Ї $PX@XYC @XLC@aPPA@XDHP#XDXPXPACXDh!`.#XDh!`.h`A*CXDP X &P h!`.X h!`.C(XDPX&Ph!`.Xh!`.h`h`ACJXDXPAC6XHPXDPACC'B BX@8XDZHPD$QC$#ю p@AA*8T %ldunknown type in lioble on behalf of an incoming request from .I uux. Typically, a restricted site will permit little other than the receipt of mail via .I uux. .SH BUGS Only the first command of a shell pipeline may have a system-name!. All other commands are executed on the system of the first command. .br The use of the shell metacharacter .B * will probably not do what you want it to do. .br The shell tokens << and >> are not implemented. .br There is no notification of denial of execution on the remote machine. t are braces, brackets, bars, .B c and .B f for ceiling and floor, and "" for nothing at all (useful for a right-side-only bracket). .PP Vertical piles of things are made with .BR pile , .BR lpile , .BR cpile , and .BR rpile : .I "pile {a above b above c}" produces $pile {a above b above c}$. There can be an arbitrary number of elements in a pile. .B lpile left-justifies, .B pile and .B cpile center, with different vertical spacing, and .B rpile right justifies. .PP Matrices are made with .BR matrix : .I )9IYi )9Y.TH UUCP 1C .SH NAME uucp, uulog \- unix to unix copy .SH SYNOPSIS .B uucp [ option ] ... source-file ... destination-file .PP .B uulog [ option ] ... .SH DESCRIPTION .I Uucp copies files named by the source-file arguments to the destination-file argument. A file name may be a path name on your machine, or may have the form .IP system-name!pathname .LP where `system-name' is taken from a list of system names which .I uucp knows about. Shell metacharacters ?*[] appearing in the pathname part will be expan"matrix { lcol { x sub i above y sub 2 } ccol { 1 above 2 } }" produces $matrix { lcol { x sub i above y sub 2 } ccol { 1 above 2 } }$. In addition, there is .B rcol for a right-justified column. .PP .vs 12p Diacritical marks are made with .BR dot , .BR dotdot , .BR hat , .BR tilde , .BR bar , .BR vec , .BR dyad , and .BR under : .I "x dot = f(t) bar" is $x dot = f(t) bar$, .I "y dotdot bar ~=~ n under" is $y dotdot bar ~=~ n under$, and .I "x vec ~=~ y dyad" is $x vec ~=~ y dyad$. .PP Sizes and font can beded on the appropriate system. .PP Pathnames may be one of .IP (1) a full pathname; .IP (2) a pathname preceded by .IR ~user ; where .I user is a userid on the specified system and is replaced by that user's login directory; .IP (3) anything else is prefixed by the current directory. .PP If the result is an erroneous pathname for the remote system the copy will fail. If the destination-file is a directory, the last part of the source-file name is used. .ig If a simple .I ~user destination is inaccessible to changed with .B size .I n or .B size .BI \(+- n, .BR roman , .BR italic , .BR bold , and .BR font .I n. Size and fonts can be changed globally in a document by .B gsize .I n and .B gfont .IR n , or by the command-line arguments .BI \-s n and .BI \-f n. .PP Normally subscripts and superscripts are reduced by 3 point sizes from the previous size; this may be changed by the command-line argument .BI \-p n. .PP Successive display arguments can be lined up. Place .B mark before the desired lineup point in the fs_wsle"init f_init c_le reading external formatte t_putc"putn .I uucp, data is copied to a spool directory and the user is notified by .IR mail (1). .. .PP .I Uucp preserves execute permissions across the transmission and gives 0666 read and write permissions (see .IR chmod (2)). .PP The following options are interpreted by .IR uucp . .TP .B \-d Make all necessary directories for the file copy. .TP .B \-c Use the source file when copying out rather than copying the file to the spool directory. .TP .B \-m Send mail to the requester when the copy is complete. .PP .irst equation; place .B lineup at the place that is to line up vertically in subsequent equations. .PP Shorthands may be defined or existing keywords redefined with .BI define : .I "define thing % replacement %" defines a new token called .I thing which will be replaced by .I replacement whenever it appears thereafter. The .I % may be any character that does not occur in .I replacement. .PP Keywords like .I sum .EQ ( sum ) .EN .I int .EQ ( int ) .EN .I inf .EQ ( inf ) .EN and shorthands like >= .EQ (>=) .l_write"lioproc curunit nowwriti e_wsle"recpos cf _flsbuf lwrt_I" sprintf strlen lwrt_L"wrt_L lwrt_A"lwrt_F"zscale wrt_F wrt_E lwrt_C"Lfatal fltused lread.oj0P p,Ї X@X #4%CpX@%QBX @X&P# X@PA@P#5XC X@I Uulog maintains a summary log of .I uucp and .IR uux (1) transactions in the file `/usr/spool/uucp/LOGFILE' by gathering information from partial log files named `/usr/spool/uucp/LOG.*.?'. It removes the partial log files. .PP The options cause .I uulog to print logging information: .TP .BI \-s sys Print information about work involving system .I sys. .TP .BI \-u user Print information about work done for the specified .I user. .SH FILES /usr/spool/uucp - spool directory .br /usr/lib/uucp/* - other datEN \-> .EQ (->), .EN and != .EQ ( != ) .EN are recognized. Greek letters are spelled out in the desired case, as in .I alpha or .I GAMMA. Mathematical words like sin, cos, log are made Roman automatically. .IR Troff (1) four-character escapes like \e(bs (\(bs) can be used anywhere. Strings enclosed in double quotes "..." are passed through untouched; this permits keywords to be entered as text, and can be used to communicate with .I troff when all else fails. .SH "SEE ALSO" .PP troff(1), tbl(1), ms(7), eqn #7X@$P %#ю p,p,Ї X@X #4$CAJP #7X#2" $#ю p,p<Ї$PXX@X#8pP@C@[PpPA@pCC4X@X#7%P@C@bP%PA@%CrAP*C0X@PXPA@X@ B0>X@X#8pP@C@hPpPA@pCC4X@X#7%P@C@pP%PA@%CAP(C0X@PXPA@$C$P@$P@'t@P@vPX@PA@&tAP@Q#2" X,C0inning with `~' have special meanings. .PP The .I send process interprets the following: .TP 18 ~\|\fB.\| terminate the conversation. .br .ns .TP 18 ~EOT terminate the conversation .TP 18 ~[>][:]file .br zero or more lines to be written to file .br \&~> .PP In any case, output .TH PAUSE 2 .SH NAME pause \- stop until signal .SH SYNOPSIS .B pause( ) .SH DESCRIPTION .I Pause never returns normally. It is used to give up control while waiting for a signal from .IR kill (2) or .IR alarm (2). .SH SEE ALSO kill(1), kill(2), alarm(2), signal(2), setjmp(3) .SH ASSEMBLER (pause = 29.) .br .B sys pause &tAP*C0X@ B0>X@X#8pP@C@PpPA@pCrC4X@X#7%P@C@P%PA@%C:CX@PXPA@AP.!5APXC$/`@C$/`@CX@QB0X@Q!7XB0"X@PXPA@$CC:X@X#8pP@C@PpPA@pCZC@P@$&U 3X$P@AP@QB0X #8X#3C$#ю p,p<ЇX@#$$C$P@APis diverted (or appended, if `>>' used) to the file. If `:' is used, the diversion is .I silent, i.e., it is written only to the file. If `:' is omitted, output is written both to the file and to the standard output. The trailing `~>' terminates the diversion. .PP The use of .B ~%put requires .I stty and .I cat on the remote side. It also requires that the current erase and kill characters on the remote system be identical to the current ones on the local system. Backslashes are inserted at appropriate plaeallprint.o <p(Ї+C@PX@PA@C@PX@PA@C@PX@PA@C@PX@PA@C+PAB0*'t+P@PX@PA@&tCFX@%QB+X @X&PCX@P+PA@CC@P@&U 3X#юp(p(ЇX(C0X(&P(PAC#юp(p(ЇX( #&X(!$#$#юp( @Q#2" X,!8$P@$CX/!8$P@$CzX@C0X@PXPA@'t@P@PX@PA@&tAP*C0:X@X#8pP@C@PpPA@pCCX@PXPA@AP'#6X"!7X CX@QB0X@Q!7XB0"X@PXPA@$CRC:X@X#8pP@C@PpPA@pC$ P@X@#9X@PA@PXPA@P@PX@B0:X@X#8ces. .PP The use of .B ~%take requires the existence of .I echo and .I tee on the remote system. Also, .B "stty tabs" mode is required on the remote system if tabs are to be copied without expansion. .SH FILES /dev/cua0 .br /dev/cul0 .br /dev/null .SH "SEE ALSO" dn(4), tty(4) .SH DIAGNOSTICS Exit code is zero for normal exit, nonzero (various values) otherwise. .SH BUGS The syntax is unique. N0l\n\t\b\b\%-3oqP@C@PqPA@qC$PAVP C0BX C06XC0*X&PYCXX&PCXYB0NXPPX@PA@P@X@Z'PXX&PCX!4%CX B0PX@\B0$%Q%QX&PYCXX&P#CJCnA>P B00X&PYCXX&P#C C.X@PXPA@X&P$$#Cvюp<p,Ї X@!4A@$PX,PA2P#5XCT.ds TW \v'.25m'\s+2~\s-2\v'-.25m' .ds ST \v'.25m'*\v'-.25m' .ds IM \v'.1m'=\v'-.1m'\s-2\h'-.1m'>\h'.1m'\s+2 .ds LE \(<= .ds LT \s-2<\s+2 .ds GT \s-2>\s+2 .TH ADB 1 "Perkin-Elmer" .SH NAME adb \- debugger .SH SYNOPSIS .B adb [\fB\-w\fR] [ objfil [ corfil ] ] .SH DESCRIPTION .I Adb is a general purpose debugging program. It may be used to examine files and to provide a controlled environment for the execution of UNIX programs. .PP .I Objfil is normally an executable program file, preferably containing a symbadcladcallprint"~allprinL.0(cL3L4L5yyout fprintf L2.L60L7L8NL9L10lL11L12printabl"zL13L14L15 L10000L10001 _flsbuf L10003L10004L10005 L10sprint":$P@$P@$P@$P@BP@$P@X@X$#:X@PA@#$#ю p,p,Ї A PX@Q#6AP" XB0 X@ #4%ClX@CbX/!8$P@$CJX,B0"APX@Q#6AP" X@PXPA@$#ю p,p(Ї@P@X(X #X(XC8X(X#8eP@C@PePA@eC$P@P@X(P@X(X,P@X@XB0h'xX(XP $P$PX,PA@&xC08X(Xol table; if not then the symbolic features of .I adb cannot be used although the file can still be examined. The default for .I objfil is .B a.out. .I Corfil is assumed to be a core image file produced after executing .IR objfil ; the default for .I corfil is .B core. .PP Requests to .I adb are read from the standard input and responses are to the standard output. If the .B \-w flag is present then both .I objfil and .I corfil are created if necessary and opened for reading and writing so that files ~sprint:L.1(sL17DL18nL16p~printabzL.2(cL10007L10006L10008L19main.o(p(ЇA@$PA@юp(Yiadcladcmain"~mainL.0(yylex exit L1reject.oP#8fP@C@PfPA@fCXX@XP@X@XB06X(X#8gP@C@PgPA@g#$#юp(p(Ї'xX(XP X4PX0PX,PX@A&x#юp(.@RFTft R D R D `list inlist inlist in%dno replreadno starlreacan be modified using .IR adb . .I Adb ignores QUIT; INTERRUPT causes return to the next .I adb command. .PP In general requests to .I adb are of the form .PP .if n .ti 16 .if t .ti 1.6i [\|\fIaddress\fR\|] [\|, .IR count \|] [\|\fIcommand\fR\|] [\|;\|] .PP If .I address is present then .I dot is set to .IR address . Initially .I dot is set to 0. For most commands .I count specifies how many times the command will be executed. The default .I count is 1. .I Address and .I count are expressions. .PP The in p(ЇX@U@C(A@X@&P@@$Q@CX@XC X@&P@XPACX@'P@C X@@PA@X@'P@$@X@XC0HX@XXP@C0.X@XC X@&P@XPADC6C`@!4$C"A@P@PA@$P@%#юp(p(ЇX@P@X(@C0d [(PX@XXPA@C0:X@C *%Q@X@'P@@PA@CX@@P@d%lfno comma%lfno )%dno starlreadlogical%dno starno quoteno spacelist iostlerliolioIYYYiYIII Y)terpretation of an address depends on the context it is used in. If a subprocess is being debugged then addresses are interpreted in the usual way in the address space of the subprocess. For further details of address mapping see .SM ADDRESSES. .SH EXPRESSIONS .TP 7.2n .B . The value of .IR dot . .TP 7.2n + The value of .I dot incremented by the current increment. .TP 7.2n ^ The value of .I dot decremented by the current increment. .TP 7.2n " The last .I address typed. .TP 7.2n .I integer An octal number ifX@$@X(#юp(iyiii)(Iiiyiyii)(iIY YY     .I integer begins with a 0; a hexadecimal number if preceded by .BR # ; otherwise a decimal number. .TP 7.2n .IB integer . fraction A 32 bit floating point number. .TP 7.2n .I \'cccc\|\' The ASCII value of up to 4 characters. \\ may be used to escape a \'. .TP 7.2n .I \*(LT name The value of .IR name , which is either a variable name or a register name. .I Adb maintains a number of variables (see .SM VARIABLES\*S) named by single letters or digits. If .I name is a register name then the value of the registyadcladcyyreject"~yyrejecL.0(L2 yylsp yyolsp L3Byyinput yyleng yytext L46yyfnd L5pyyracc"LL1BL6pyylstate L7yyunput L8 L9 yyprevio yyoutput ~yyraccLL.1(myyextra L11Y)Y)Y)er is obtained from the system header in .IR corfil . The register names are .RS .TP 8n .BR r0 .. rf general registers .TP .B sp stack pointer .TP .B pc program counter .TP .B ps PSW status .RE .TP 7.2n .I symbol A .I symbol is a sequence of upper or lower case letters, underscores or digits, not starting with a digit. .BR \\ " may be used to escape other characters." The value of the .I symbol is taken from the symbol table in .IR objfil . An initial \_ or \*(TW will be prepended to .I symbol if needed. .TL12ryyback L13L10yyless.o$H p(ЇX@X(BX(Y@!'X(#X(C ' PA@" $ #'' P@ P@юp( adcladcyyless"~yylessL.0(xlastch ptrY)Y)Y)P 7.2n .IB routine . name The address of the variable .I name in the specified C routine. Both .I routine and .I name are .IR symbols . If .I name is omitted the value is the address of the most recently activated C stack frame corresponding to .IR routine . .TP 7.2n .RI ( exp \|) The value of the expression .IR exp . .LP .SM .B "Monadic\ operators" .TP 7.2n .RI \*(ST exp The contents of the location addressed by .I exp in .IR corfil . .TP 7.2n .RI @ exp The contents of the location addressed by .I exp in  yyleng yytext L26L3:L4:L5Ryyunput L6lyyprevio L1zyywrap.o+`p(Ї$#юp(adcladcyywrap"~yywrapL.0(L1Y)YY  Y)Y .IR objfil . .TP 7.2n .RI \- exp Integer negation. .TP 7.2n .RI \*(TW exp Bitwise complement. .LP .B "Dyadic\ operators" are left associative and are less binding than monadic operators. .TP 7.2n .IR e1 + e2 Integer addition. .TP 7.2n .IR e1 \- e2 Integer subtraction. .TP 7.2n .IR e1 \*(ST e2 Integer multiplication. .TP 7.2n .IR e1 % e2 Integer division. .TP 7.2n .IR e1 & e2 Bitwise conjunction. .TP 7.2n .IR e1 \(bv e2 Bitwise disjunction. .TP 7.2n .IR e1 # e2 .I E1 rounded up to the next multiple of .IR e.TH OPEN 2 .SH NAME open \- open for reading or writing .SH SYNOPSIS .B open(name, mode) .br .B char *name; .SH DESCRIPTION .I Open opens the file .I name for reading (if .I mode is 0), writing (if .I mode is 1) or for both reading and writing (if .I mode is 2). .I Name is the address of a string of ASCII characters representing a path name, terminated by a null character. .PP The file is positioned at the beginning (byte 0). The returned file descriptor must be used for subsequent calls for other input-ou Y)YY) Y)Y Y2 . .DT .SH COMMANDS Most commands consist of a verb followed by a modifier or list of modifiers. The following verbs are available. (The commands `?' and `/' may be followed by `\*(ST'; see .SM ADDRESSES for further details.) .TP .5i .RI ? f Locations starting at .I address in .I objfil are printed according to the format .IR f . .TP .RI / f Locations starting at .I address in .I corfil are printed according to the format .IR f . .TP .RI = f The value of .I address itself is printed in the styles indicatput functions on the file. .SH "SEE ALSO" creat(2), read(2), write(2), dup(2), close(2) .SH DIAGNOSTICS The value \-1 is returned if the file does not exist, if one of the necessary directories does not exist or is unreadable, if the file is not readable (resp. writable), or if too many files are open. .SH ASSEMBLER (open = 5.) .br .B sys open; name; mode .br (file descriptor in r0) )Y)YY  Y)Yted by the format .IR f . (For .B i format `?' is printed for the parts of the instruction that reference subsequent words.) .PP A .I format consists of one or more characters that specify a style of printing. Each format character may be preceded by a decimal integer that is a repeat count for the format character. While stepping through a format .I dot is incremented temporarily by the amount given for each format letter. If no format is given then the last format is used. The format letters available ar.TH MKNOD 2 .SH NAME mknod \- make a directory or a special file .SH SYNOPSIS .B mknod(name, mode, addr) .br .B char *name; .SH DESCRIPTION .I Mknod creates a new file whose name is the null-terminated string pointed to by .IR name . The mode of the new file (including directory and special file bits) is initialized from .IR mode . (The protection part of the mode is modified by the process's mode mask; see .IR umask (2)). The first block pointer of the i-node is initialized from .IR addr . For ordinary fi) Y)Y Y)les and directories .I addr is normally zero. In the case of a special file, .I addr specifies which special file. .PP .I Mknod may be invoked only by the super-user. .SH "SEE ALSO" mkdir(1), mknod(1), filsys(5) .SH DIAGNOSTICS Zero is returned if the file has been made; \-1 if the file already exists or if the user is not the super-user. .SH ASSEMBLER (mknod = 14.) .br .B sys mknod; name; mode; addr Y)  e as follows. .ta 2.5n .5i .RS .TP .BR o " 2" Print 2 bytes in octal. All octal numbers output by .I adb are preceded by 0. .br .ns .TP .BR O " 4" Print 4 bytes in octal. .br .ns .TP .BR q " 2" Print short signed octal. .br .ns .TP .BR Q " 4" Print long signed octal. .br .ns .TP .BR d " 2" Print short decimal. .br .ns .TP .BR D " 4" Print long decimal. .br .ns .TP .BR x " 2" Print 2 bytes in hexadecimal. .br .ns .TP .BR X " 4" Print 4 bytes in hexadecimal. .br .ns .TP .BR u " 2" Print as an unsigned short d.TH LSEEK 2 .SH NAME lseek, tell \- move read/write pointer .SH SYNOPSIS .B long lseek(fildes, offset, whence) .br .B long offset; .PP .B long tell(fildes) .SH DESCRIPTION The file descriptor refers to a file open for reading or writing. The read (resp. write) pointer for the file is set as follows: .IP If .I whence is 0, the pointer is set to .I offset bytes. .IP If .I whence is 1, the pointer is set to its current location plus .IR offset . .IP If .I whence is 2, the pointer is set to the size of the filY))IYiIIyY Y)ecimal number. .br .ns .TP .BR U " 4" Print long unsigned decimal. .br .ns .TP .BR f " 4" Print the 32 bit value as a floating point number. .br .ns .TP .BR F " 8" Print double floating point. .br .ns .TP .BR b " 1" Print the addressed byte in octal. .br .ns .TP .BR c " 1" Print the addressed character. .br .ns .TP .BR C " 1" Print the addressed character using the following escape convention. Character values 000 to 040 are printed as @ followed by the corresponding character in the range 0100 to 0140. Thee plus .IR offset . .PP The returned value is the resulting pointer location. .PP The obsolete function .IR tell ( fildes ) is identical to .IR lseek ( "fildes, 0L, 1" ). .PP Seeking far beyond the end of a file, then writing, creates a gap or `hole', which occupies no physical space and reads as zeros. .SH "SEE ALSO" open(2), creat(2), fseek(3) .SH DIAGNOSTICS \-1 is returned for an undefined file descriptor, seek on a pipe, or seek to a position before the beginning of file. .SH BUGS .I Lseek is a no-op o 8II IYI  character @ is printed as @@. .br .ns .TP .BI s " n" Print the addressed characters until a zero character is reached. .br .ns .TP .BI S " n" Print a string using the @ escape convention. .I n is the length of the string including its zero terminator. .br .ns .TP .BR Y " 4" Print 4 bytes in date format (see .IR ctime (3)). .br .ns .TP .BR i " n" Print as Perkin-Elmer instructions. .I n is the number of bytes occupied by the instruction. This style of printing causes variables 1 and 2 to be set to the offsn character special files. .SH "ASSEMBLER (PDP11) (lseek = 19.) .br (file descriptor in r0) .br .B sys lseek; offset1; offset2; whence .PP .I Offset1 and .I offset2 are the high and low words of .IR offset ; r0 and r1 contain the pointer upon return. .SH "ASSEMBLER (Perkin-Elmer) Since .B long is equivalent to .B int on the Perkin-Elmer series, only one word of .I offset is required: .LP .NF lseek equ 19 li 0,fd svc 0,lseek dc offset dc whence .fi .PP The resuXlioproc$ltab#Pl_first$t_getc"curunit cf _filbuf e_rsle"lquit$lcount$ltype$lchar$lxet parts of the source and destination respectively. .br .ns .TP .BR a " 0" Print the value of .I dot in symbolic form. Symbols are checked to ensure that they have an appropriate type as indicated below. .LP / local or global data symbol .br ? local or global text symbol .br = local or global absolute symbol .TP .BR p " 4" Print the addressed value in symbolic form using the same rules for symbol lookup as .BR a . .br .ns .TP .BR t " 0" When preceded by an integer tabs to the next appropriate tab stop. lting pointer location is returned in r0. $ly$l_read"elist errno fatal ungetc t_sep"l_R"(l_C"l_L" l_CHAR"Nclearerr b_char rd_int"_ctype_ fscanf free malloc realloc s_rsle":init f_init c_le"reading external formatte nowreadi fmtbuf recpos scale units fk_oFor example, .B 8t moves to the next 8-space tab stop. .br .ns .TP .BR r " 0" Print a space. .br .ns .TP .BR n " 0" Print a newline. .br .ns .tr '" .TP .BR '...' " 0" Print the enclosed string. .br .tr '' .br .ns .TP .B ^ .I Dot is decremented by the current increment. Nothing is printed. .br .ns .TP + .I Dot is incremented by 1. Nothing is printed. .br .ns .TP \- .I Dot is decremented by 1. Nothing is printed. .RE .TP newline If the previous command temporarily incremented .IR dot , make the increment per.TH LINK 2 .SH NAME link \- link to a file .SH SYNOPSIS .B link(name1, name2) .br .B char *name1, *name2; .SH DESCRIPTION A link to .I name1 is created; the link has the name .IR name2 . Either name may be an arbitrary path name. .SH "SEE ALSO" ln(1), unlink(2) .SH DIAGNOSTICS Zero is returned when a link is made; \-1 is returned when .I name1 cannot be found; when .I name2 already exists; when the directory of .I name2 cannot be written; when an attempt is made to link to a directory by a user other than pen do_lio"fltused open.ojH\Pp<ЇXXX .PP .B ioctl(fildes, request, argp) .br .B struct sgttyb *argp; .PP .B stty(fildes, argp) .br .B struct sgttyb *argp; .PP .B gtty(fildes, argp) .br .B struct sgttyb *argp; .SH DESCRIPTION .I Ioctl performs a variety of functions on character special files (devices). The writeups of various devices in section 4 discuss how .I ioctl applies to them. .PP For certain status setting and status inquiries about terminal deP$PXXPA@&tX$P$C f Send output to the file .I f, which is created if it does not exist. .br .ns .TP .B r Print the genvices, the functions .I stty and .I gtty are equivalent to .RS .B ioctl(fildes, TIOCSETP, argp) .br .B ioctl(fildes, TIOCGETP, argp) .RE .LP respectively; see .IR tty (4). .PP The following two calls, however, apply to any open file: .PP .RS .B ioctl(fildes, FIOCLEX, NULL); .br .B ioctl(fildes, FIONCLEX, NULL); .RE .LP The first causes the file to be closed automatically during a successful .I exec operation; the second reverses the effect of the first. .SH "SEE ALSO" .mc | stty(1), tty(4), exec(2), mt(4), @X causes the standard input or output to be estand out who invoked them. .PP .I Getgid returns the real group ID, .I getegid the effective group ID. .SH "SEE ALSO" setuid(2) .SH ASSEMBLER (getuid = 24.) .br .B sys getuid .br (real user ID in r0, effective user ID in r1) .PP (getgid = 47.) .br .B sys getgid .br (real group ID in r0, effective group ID in r1) I9iIblished for the command. All signals are turned on on entry to the subprocess. .TP .BI c s The subprocess is continued with signal .I s c .I s, see .IR signal (2). If .I address is given then the subprocess is continued at this address. If no signal is specified then the signal that caused the subprocess to stop is sent. Breakpoint skipping is the same as for .BR r . .TP .BI s s As for .B c except that the subprocess is single stepped .I count times. If there is no current subprocess then .I objfil is run .TH GETPID 2 .SH NAME getpid \- get process identification .SH SYNOPSIS .B getpid( ) .SH DESCRIPTION .I Getpid returns the process ID of the current process. Most often it is used to generate uniquely-named temporary files. .SH "SEE ALSO" mktemp(3) .SH ASSEMBLER (getpid = 20.) .br .B sys getpid .br (pid in r0) f_open"errno fatal units g_char access strlen calloc strcpy isdev"0fopen fseek canseek inode rewind mktemp creat f_clos fk_open"jsprintf stat close.ojp,Ї X,X !$CBX,X,Pas a subprocess as for .BR r . In this case no signal can be sent; the remainder of the line is treated as arguments to the subprocess. .TP .B k The current subprocess, if any, is terminated. .RE .SH VARIABLES .I Adb provides a number of variables. Named variables are set initially by .I adb but are not used subsequently. Numbered variables are reserved for communication as follows. .TP 0 The last value printed. .br .ns .TP 1 The last offset part of an instruction source. .br .ns .TP 2 The previous value o.TH FORK 2 .SH NAME fork \- spawn new process .SH SYNOPSIS .B fork( ) .SH DESCRIPTION .I Fork is the only way new processes are created. The new process's core image is a copy of that of the caller of .IR fork . The only distinction is the fact that the value returned in the old (parent) process contains the process ID of the new (child) process, while the value returned in the child is 0. Process ID's range from 1 to 30,000. This process ID is used by .IR wait (2). .PP Files open before the fork are shaXX!4$CX$P X,XC0X,XCXX$#8XPA@XXPA@XX#:XXPA@X$PX$P$CXXPA@XXC0$XXPA@XXPA@X$PX$P$C6C@P@ &U 3X CXX(C0rCю p,p8Ї$P$P$PX CXP PAZ$QCюp8p,Ї $PX C8X,X@C0X,X@PA@$QCю p,dknnf variable 1. .PP On entry the following are set from the system header in the .IR corfil . If .I corfil does not appear to be a .B core file then these values are set from .IR objfil . .TP b The base address of the data segment. .br .ns .TP d The data segment size. .br .ns .TP e The entry point. .br .ns .TP m The `magic' number (0405, 0407, 0410 or 0411). .br .ns .TP s The stack segment size. .br .ns .TP t The text segment size. .SH ADDRESSES The address in a file associated with a written address is detered, and have a common read-write pointer. In particular, this is the way that standard input and output files are passed and also how pipes are set up. .SH "SEE ALSO" wait(2), exec(2) .SH DIAGNOSTICS Returns \-1 and fails to create a process if: there is inadequate swap space, the user is not super-user and has too many processes, or the system's process table is full. Only the super-user can take the last process-table slot. .SH ASSEMBLER (fork = 2.) .br .B sys fork .br (new process return) .br (old procermined by a mapping associated with that file. Each mapping is represented by two triples .RI ( "b1, e1, f1" ) and .RI ( "b2, e2, f2" ) and the .I file address corresponding to a written .I address is calculated as follows. .PP .if t .ti 1.5i .if n .ti 8 .IR b1 \*(LE address < e1 \*(IM .IR "file address" = address + f1\-b1, otherwise, .PP .if t .ti 1.5i .if n .ti 8 .IR b2 \*(LE address < e2 \*(IM .IR "file address" = address + f2\-b2, .PP otherwise, the requested .I address is not legal. In some cases (e.g.ss return, new process ID in r0) .PP The return locations in the old and new process differ by one word. The C-bit is set in the old process if a new process could not be created.   #&),/258;>ADGJMPSVY\_behknqtwz} for programs with separated I and D space) the two segments for a file may overlap. If a .B ? or .B / is followed by an .B \*(ST then only the second triple is used. .PP The initial setting of both mappings is suitable for normal .B a.out and .B core files. If either file is not of the kind expected then, for that file, .I b1 is set to 0, .I e1 is set to the maximum file size and .I f1 is set to 0; in this way the whole file can be examined with no address translation. .PP So that .I adb may be used o.TH EXIT 2 .SH NAME exit \- terminate process .SH SYNOPSIS .B exit(status) .br .B int status; .PP .B _exit(status) .br .B int status; .SH DESCRIPTION .I Exit is the normal means of terminating a process. .I Exit closes all the process's files and notifies the parent process if it is executing a .IR wait . The low-order 8 bits of .I status are available to the parent process. .PP This call can never return. .PP The C function .I exit may cause cleanup actions before the final `sys exit'. The function .I _e)9I9YIn large files all appropriate values are kept as signed 32 bit integers. .SH FILES /dev/mem .br /dev/swap .br a.out .br core .SH SEE\ ALSO ptrace(2), a.out(5), core(5) .SH DIAGNOSTICS `Adb' when there is no current command or format. Comments about inaccessible files, syntax errors, abnormal termination of commands, etc. Exit status is 0, unless last command failed or returned nonzero status. .SH BUGS A breakpoint set at the entry point is not effective on initial entry to the program. .br Single stepping dxit circumvents all cleanup. .SH "SEE ALSO" wait(2) .SH ASSEMBLER (exit = 1.) .br (status in r0) .br .B sys exit f_clos"units t_runc fclose free unlink f_exit"jflush_"fflush util.okp p0ЇX0Z4'P X8Z4'PX$X U0B.X  B0X'P$%Q CX U0B$X 'P X.'PCюp0p,Ї $PXY4C8X,C0*X,&P,X.0&P0$QCXY4CX0oes not work. .br When continuing execution from a breakpoint, the breakpoint is removed temporarily and replaced only when another breakpoint is encountered. Thus any loop being tested needs to have at least two breakpoints in it. .br Register variables in the currently executing C function are not accessible. .br Local variables whose names are the same as an external variable may foul up the accessing of the external. .TH DUP 2 .SH NAME dup, dup2 \- duplicate an open file descriptor .SH SYNOPSIS .B dup(fildes) .br .B int fildes; .PP .B dup2(fildes, fildes2) .br .B int fildes, fildes2; .SH DESCRIPTION Given a file descriptor returned from an .I open, .I pipe, or .I creat call, .I dup allocates another file descriptor synonymous with the original. The new file descriptor is returned. .PP In the second form of the call, .I fildes is a file descriptor referring to an open file, and .I fildes2 is a non-negative integer less &P0 $QCю p,pHЇ(PXHPA@#%#s #ю(pHp4ЇX4\8P$T. .I Ps makes an educated guess as to the file name and arguments given when the process was created by examining core memory or the swap area. The method is inherently somewhat unreliable and in any event a process is entitled to destroy this information, so the names cannot be counted on too much. .PP If the .B k option is specified, tt be granted. On disallowed accesses \-1 is returned and the error code is in .IR errno . 0 is returned from successful tests. .PP The user and group IDs with respect to which permission is checked are the real UID and GID of the process, so this call is useful to set-UID programs. .PP Notice that it is only access bits that are checked. A directory may be announced as writable by .I access, but an attempt to open it for writing will fail (although files may be created there); a file may look executable, bu(XP@P@ PA@&xA@'x$ P X0PX(XPX,PA&xC'xX0P X(XPX(XPX,PA&xC\'x$P X0PX(XPX,PAB&xC.X(XPX,PACX0PX,PAVC'tX0PX(XPX,PA|&tC'|X0PX(X P X(XPX(XPX,PA&|C'|X0PX(X P X(XPX(XPX,PAb&|CR'xX0P X(XPX(XPX,PA&xCC'B BX@pюp(p(ЇXhe file .I /usr/sys/core is used in place of .IR /dev/mem . This is used for postmortem system debugging. If a second argument is given, it is taken to be the file containing the system's namelist. .SH FILES .ta \w'/usr/sys/core 'u /unix system namelist .br /dev/mem core memory .br /usr/sys/core alternate core file .br /dev searched to find swap device and tty names .SH "SEE ALSO" kill(1) .SH BUGS Things can change while .I ps is running; the picture it gives is only a close approximation to reality. .br t .I exec will fail unless it is in proper format. .PP .SH SEE ALSO stat(2) .SH ASSEMBLER (access = 33.) .br .B sys access; name; mode (XC'xX@P X(XP@;P@ PA@&xA@X@ACX(X[@P@$CX@X([P@$CfX(XQ@$CRX(XPAC>X(XPX(XPACC' B .B(X@юp(p@Ї XLXH!9X@HP C$XH!8X@P #X@XP 'xP PPX PA@&xPXD[PX!5X@#4%QXC2$PXYDC*PX@A$QCC$PXYC PX@A$QCXC0Some data printed for defunct processes is irrelevant .TH WRITE 2 .SH NAME write \- write on a file .SH SYNOPSIS .B write(fildes, buffer, nbytes) .br .B char *buffer; .SH DESCRIPTION A file descriptor is a word returned from a successful .I open, .I creat, .I dup, or .IR pipe (2) call. .PP .I Buffer is the address of .I nbytes contiguous bytes which are written on the output file. The number of characters actually written is returned. It should be regarded as an error if this is not the same as requested. .PP Writes which are multiples of 512 characters long -PX@ACX@#:+PX@A$PXYC(X&PPX@A$QC$#ю p@pDЇ$XP!9XDHP C$XP!8XDP #XDXP 'tP PX PA@&tPX!5X@#5$P#$PX ZYH!)XLZYHC 4$PXYHC*PX@A$QC$CHX B0C8X,'P,C0"X&PPX@AC$#ю p,p,Ї $PX0'YC  PX@A$QCd, words are collected from the standard input. .PP .I Spell ignores most .I troff, .I tbl and .IR eqn (1) constructions. .PP Under the .B \-v option, all words not literally in the spelling list are printed, and plausible derivations from spelling list words are indicated. .PP Under the .B \-b option, British spelling is checked. Besides preferring .ft I centre, colour, speciality, travelled, .ft R etc., this option insists upon .I -ise in words like .I standardise, Fowler and the OED to the contrary not.TH TIMES 2 .SH NAME times \- get process times .SH SYNOPSIS .B times(buffer) .br .B struct tbuffer *buffer; .SH DESCRIPTION .I Times returns time-accounting information for the current process and for the terminated child processes of the current process. All times are in 1/HZ seconds, where HZ=60 in North America, .mc | and 100 in Australia. .mc .PP After the call, the buffer will appear as follows: .PP .nf struct tbuffer { long proc_user_time; long proc_system_time; long child_user_time; long child_X,XC0tPX@A# fPX@A$#ю p,p(ЇX,'P,C "X(&P(PX@AC$#юp(p(ЇX,Y0C %Q, PX@ACX,'P,C "X(&P(PX@AC$#юp(p<ЇX@#$$QD'xP PXDPXL!8X .br .B #include .br .B ftime(tp) .br .B struct timeb *tp; .SH DESCRIPTION .I Time returns the time since 00:00:00 GMT, Jan. 1, 1970, measured in seconds. .PP If .I tloc is nonnull, the return value is also stored in the place to which .I tloc points. .PP The .I ftime entry fills in a structure pointed to by its argument, as defined by .IR : .PP .nf .ta .5i +\w'unsigned 'u .so /usr/include/sys/timeb.h .fi .PP The structure contains the time since the epoch in seconds, up to 1000 milliseconds of more-precise interval, the local timezone (measured in minutes of time westward from Greenwich), and a flag that, if nonzero, indicates that Daylight Saving time applies locally during the appropriate part of the year. .SH "SEE ALSO" date(1), stime(2), ctime(3) .SH "ASSEMBLER (PDP11) (ftime = 35.) .br .B sys ftime; bufptr .PP (time = 13.; o C PX@A$QCXP@XCJ$Qh$/!,`C<'|XPPXLP XHPXDPX@PA&|#ю p@pDЇ$XP!6XDh!#XDh!`. X@C0hX@C 0$P X Y@Ch $/!,` $Q CC.$P [@Y C h $/!-` $Q C'xP PXLPh `A@&xP [YL!$PX!5X@#5$P#$PXHX#$X#$ZZL PXC4$P X YHC*PX@A$Q C$CH$P X YC PX@A.TH CLRI 1M .SH NAME clri \- clear i-node .SH SYNOPSIS .B clri filesystem i-number ... .SH DESCRIPTION .I Clri writes zeros on the i-nodes with the decimal .I i-numbers on the .I filesystem. After .I clri, any blocks in the affected file will show up as `missing' in an .IR icheck (1) of the .I filesystem. .PP Read and write permission is required on the specified file system device. The i-node becomes allocatable. .PP The primary purpose of this routine is to remove a file which for some reason appears in bsolete call) .br .B sys time .br (time since 1970 in r0-r1) .SH "ASSEMBLER (Perkin-Elmer) .nf ftime equ 35 svc 0,ftime dc a(timebuf) time equ 13 svc 0,time * time since 1970 in r0 .fi $Q CXC0-PX@ACX@#:+PX@A$P X YC(X&PPX@A$Q C.PX@A$P [Y C (X YLC0PX@A$Q CX YLCJXC0 X&PPX@A# 0PX@A$Q C$#ю$pDl22222222222222XXX0LLLLL@left offfmtw_ed, unexpected code: %d %s w_nedno directory. If it is used to zap an i-node which does appear in a directory, care should be taken to track down the entry and remove it. Otherwise, when the i-node is reallocated to some new file, the old entry will still point to that file. At that point removing the old entry will destroy the new file. The new entry will again point to an unallocated i-node, so the whole cycle is likely to be repeated again and again. .SH "SEE ALSO" icheck(1) .SH BUGS If the file is open, .I clri is likely to be ineffec.TH UTIME 2 .SH NAME utime \- set file times .SH SYNOPSIS .B #include .br .B utime(file, timep) .br .B char *file; .br .B time_t timep[2]; .SH DESCRIPTION The .I utime call uses the `accessed' and `updated' times in that order from the .I timep vector to set the corresponding recorded times for .I file. .PP The caller must be the owner of the file or the super-user. The `inode-changed' time of the file is set to the current time. .SH SEE ALSO stat (2) .SH ASSEMBLER (utime = 30.) .br .B sys uti, unexpected code: %d %s )9IYiyIYitive. me; file; timep 9.TH SPLINE 1G .SH NAME spline \- interpolate smooth curve .SH SYNOPSIS .B spline [ option ] ... .SH DESCRIPTION .I Spline takes pairs of numbers from the standard input as abcissas and ordinates of a function. It produces a similar set, which is approximately equally spaced and includes the input set, on the standard output. The cubic spline output (R. W. Hamming, .ft I Numerical Methods for Scientists and Engineers, .ft R 2nd ed., 349ff) has two continuous derivatives, and sufficiently many points to looke__.SYMDEFz f_backs_rdfec_dfey_getcy_erry_revs_wdfey_putce_rdfee_wdfes_rdue"c_due"s_wdue"e_rdue"e_wdue"icptr,icend,svic,icnum,icpos,z_getc,z_putc,z_rnew,s_rsfi,c_si,y_err,s_wsfi,z_wnew,e_rsfi,e_wsfi,f_inqu9setcilisGsetolistGstcllistGsetalistGf_rewJs_rsfeMx_getcMx_endpMxrd_SLM))))) smooth when plotted, for example by .IR graph (1). .PP The following options are recognized, each as a separate argument. .TP 5 .B \-a Supply abscissas automatically (they are missing from the input); spacing is given by the next argument, or is assumed to be 1 if next argument is not a number. .TP 5 .B \-k The constant .IR k "" used in the boundary value computation .IP .if n .ig .ti +1.5i .ds ' \h'-\w'\(fm\(fm'u' .EQ .nr 99 \n(.s .nr 98 \n(.f 'ps 10 .ft I .ds 11 "y\(fm\(fm .nr 11 \w'\*(11' .ds 12 "\*'x_revMrd_edVrd_IVrd_LVrd_AVrd_AWVrd_FVrd_nedVrd_POSVrd_HVreclocvs_rsuevc_suevs_wsueve_wsueve_rsuevreclenX@X#9X@P@C@PX@PA@X@#ю p,p(Ї$Q@X@X Y@#X@X B0JX@%QBX(X @X&PCX@PX(PA@C8X@X#8nP@C@PnPA@n#$#юp(p(Їend of file %d %s: %s apparent state: unit %d named %s last format: %s lately %s %s %s %s IO readingwritingsequentialdirectformattedunformattedexternalinternalray user id number (the 3rd colon-separated field). .PP .ti +8 sort \-t: +2n /etc/passwd .PP Print the first instance of each month in an already sorted file of (month day) entries. The options .B \-um with just one input file make the choice of a unique representative from a set of equal lines predictable. .PP .ti +8 sort \-um +0 \-1 dates .SH FILES /usr/tmp/stm*, /tmp/*: first and second tries for temporary files .SH "SEE ALSO" uniq(1), comm(1), rev(1), join(1) .SH DIAGNOSTICS Comments and exits with nonzerX@X #:X@X Y@!4$C6X@X Y@C  PX@AC$P@$#юp(p(ЇX@X#8nP@C@PnPA@n#юp(startiostartwrtstartchkdfedfedfereadingddoutdfe)IYYi)9IYi) o status for various trouble conditions and for disorder discovered under option .BR \-c . .SH BUGS Very long lines are silently truncated. IYY)9IYi )9IYiIYyYY)9I)9I.TH SPLIT 1 .SH NAME split \- split a file into pieces .SH SYNOPSIS .B split [ .B \-\fIn ] [ file [ name ] ] .SH DESCRIPTION .I Split reads .I file and writes it in .IR n -line pieces (default 1000), as many as necessary, onto a set of output files. The name of the first output file is .I name with .B aa appended, and so on lexicographically. If no output name is given, .B x is default. .PP If no input file is given, or if .B \- is given in its stead, then the standard input file is used. IYYYIYYIY)YYYIYIYYIunits$init$elist$reading$cplus$cblank$.TH LPR 1 .SH NAME lpr \- line printer spooler .SH SYNOPSIS .BR lpr [ -crm ] [ file ] ... .SH DESCRIPTION .I Lpr causes the named files to be queued for printing on a local printer. If no files are named, the standard input is read. The following options are available: .TP .B -r Remove the file when it has been printed. .TP .B -c Copy the file to insulate against changes that may happen before printing. .TP .B -m Report by .IR mail (1) when printing is complete. .SH FILES /usr/spool/lpd/* spool area .9IIIYIIYIY9IYYYIYII9IYfmtbuf$external$doed$doned$doend$donewrec$dorevert$sequenti$formatte$getn$putn$cf$curunit$recpos$cursor$scale$F_err#dfatal"perror _iob fprintf _cleanup abort f_init"&canseek"fstat isatty nowreadi"\ftell freopen fseek nowwriti"SH SEE ALSO lpd(8) s_rdfe"init f_init c_dfe"0reading curunit nowreadi y_getc"Hgetn rd_ed doed rd_ned doned y_err"donewrec dorevert y_rev""doend fmtbuf pars_f errno fatal fmt_bg s_wdfe"nowwriti y_putc"\putn w_ed w_ned e_rdfe"en_fio e_wdfe"fmtlib.ojp(ЇX4X(#(X0$PCHX(C [(P(X0$PC(X0$PX,$P0@@CL$X(C ,X( 0 @X( P('C$ X,P #юp(icvt"dballoc.oj .TH SA 1M .SH NAME sa, accton \- system accounting .SH SYNOPSIS .B sa [ .B \-abcjlnrstuv ] [ file ] .PP .B /etc/accton [ file ] .SH DESCRIPTION With an argument naming an existing .I file, .I accton causes system accounting information for every process executed to be placed at the end of the file. If no arguemnt is given, accounting is turned off. .PP .I Sa reports on, cleans up, and generally maintains accounting files. .PP .I Sa is able to condense the information in .I /usr/adm/acct into a summary filsequenti external formatte elist recpos scale cursor units fk_open cf fseek _filbuf _flsbuf due.oj $pp,Ї $PX,PAP#5XC($P@X@X$#9X@PA@$#ю p,p,Ї $PX,PABP#5XC($P@X@X$!9X@PA@$#ю p,p(ЇX@!4A@X(X #X(XC8Xp(ЇX(P@PA@A@юp(p0ЇX0&X@#(X@U@#)@PA#X@P $P@tX XB0pX XPXB0:XU #'XU@!@PA2#XXX. PC Z U!) Z U CdX PX XP X UC X U@#)@PA#CfXY@!8X C08't$P@P$PA@&tA@}PA@CX@t&P@t!#C P@tX@tPA@PX!4$CXU@!)e .I /usr/adm/savacct which contains a count of the number of times each command was called and the time resources consumed. This condensation is desirable because on a large system .I acct can grow by 100 blocks per day. The summary file is read before the accounting file, so the reports include all available information. .PP If a file name is given as the last argument, that file will be treated as the accounting file; .I sha is the default. There are zillions of options: .PP .TP a Place all command names(X#8eP@C@PePA@eC$P@P@P@$P@X(X,P@X(P@X@XB0h'xX(XP $P$PX,PA@&xC08X(X#8hP@C@PhPA@hC$X@XP@X@XC08X(X#8fP@C@PfPA@fCX@XB08X(X#8hP@C@PhPA@hCX@XB08X(X#8rP@C@ PrPA@rCB't$PX(X'X @\ PX@PA@&t@PA#XX@PX@&YC0X@X&X @PX@tZ'XPP@@X@PC Z P@X@U@#)@PAp#XU@C "X@XP@X XX @PX@&X PX &#юp0p,Ї X,PX@U,#X,U@#)@PA#X,'P,P@X,X!9@ containing unprintable characters and those used only once under the name `***other.' .TP b Sort output by sum of user and system time divided by number of calls. Default sort is by sum of user and system times. .TP c Besides total user, system, and real time for each command print percentage of total time over all commands. .TP j Instead of total minutes time for each category, give seconds per call. .TP l Separate system and user time; normally they are combined. .TP m Print number of processes and numbeX@$P $#юp(p(ЇX@X #:X@X Y@!4$C't$PX@X [@PX@PA@&tX@PA@X @] C08X@X#8P@C@PPA@#$#юp(p(ЇA$#юp(startioduecduecduecduesyserr)99I)99iy #3 !4 C~PP X8&U#PX'PC0$X&PXX. &P PCC$   BX@   P #юp4assertion botched: %s allocp>allocs && allocp<=alloctq>p&&qalloctallocp<=alloctp>clearbusy(allocs[1].ptr)&&p<=allocttestbusy(p->ptr)p->ptr > allocp && p->ptr <= alloct)r of CPU minutes for each user. .TP n Sort by number of calls. .TP r Reverse order of sort. .TP s Merge accounting file into summary file .I /usr/adm/savacct when done. .TP t For each command report ratio of real time to the sum of user and system times. .TP u Superseding all other flags, print for each command in the accounting file the user ID and command name. .TP v If the next character is a digit .I n, then type the name of each command used .I n times or fewer. Await a reply from the typewriter; if it9 99)9999) begins with `y', add the command to the category `**junk**.' This is used to strip out garbage. .dt .SH FILES /usr/adm/acct raw accounting .br /usr/adm/savacct summary .br /usr/adm/usracct per-user summary .SH "SEE ALSO" ac(1), acct(2) )99999)9)Y9 s_rdue"c_due"reading curunit nowreadi s_wdue"^nowwriti init f_init errno fatal formatte .TH REV 1 .SH NAME rev \- reverse lines of a file .SH SYNOPSIS .B rev [ file ] ... .SH DESCRIPTION .I Rev copies the named files to the standard output, reversing the order of characters in every line. If no file is specified, the standard input is copied. sequenti recpos external units elist fk_open cf fseek e_rdue" ftell e_wdue"iio.oj ,p(ЇX@$U@(B4X@,X#7%P@C@P%PA@%CpX@4&P@4X@,YCX@$&P@$C8X@,X#8nP@C@PnPA@n#юp(p(ЇX@$U@(B:X@,X#8nP@C@PnPA@botch"printf abort allocs#allocp#alloct#allocx#malloc"2write exit sbrk free"calloc"realloc".TH DUMP 1M .SH NAME dump \- incremental file system dump .SH SYNOPSIS .B dump [ key [ argument ... ] device [ volname ] ] .SH DESCRIPTION .I Dump copies to magnetic tape all files changed after a certain date in the .mc | filesystem currently mounted on the given .IR device . The .I volname argument is a unique name denoting the volume (physical or logical) \- usually the last component of the pathname on which the volume should be mounted. .mc The .I key specifies the date and other options about the dunCvX@4&P@4X@,YCX(X@$&P@$C8X@,X#8nP@C@PnPA@n#$#юp(p(ЇX@0&P@0X @,\X @,ZP@$$P@4юp(p,Ї X,PAP#5XCH$P@@P@@P@P@xP@P@XP@$#ю p,p,Ї X,PAbP#5XCH$P@@P@@P@&P@P@P@P@$#ю p,p(ЇX(X P@X@PA@C8X(X#8dP@C.TH STAT 2 .SH NAME stat, fstat \- get file status .SH SYNOPSIS .B #include .br .B #include .PP .B stat(name, buf) .br .B char *name; .br .B struct stat *buf; .PP .B fstat(fildes, buf) .br .B struct stat *buf; .SH DESCRIPTION .I Stat obtains detailed information about a named file. .I Fstat obtains the same information about an open file known by the file descriptor from a successful .I open, creat, dup or .IR pipe (2) call. .PP .I Name points to a null-terminated string naming amp. .I Key consists of characters from the set .B 0123456789fusd. .TP 5 .B f Place the dump on the next .I argument file instead of the tape. .TP 5 .B u If the dump completes successfully, write the date of the beginning of the dump on file `/etc/ddate'. This file records a separate date for .mc | each .I volume and each dump level. .mc .TP 5 .B 0\-9 This number is the `dump level'. All files modified since the last date stored in the file `/etc/ddate' for the same filesystem at lesser levels will be d@PdPA@dC|A@$P@P@$P@$P@P@P@X(P@,$P@4P@0X@,XP@$X@,XX @,\Z@$P@($#юp(p(ЇX@4&P@4X@,YCX@$&P@$ C$P@4$Q@0юp(p,Ї A@P$P@X#ю p,p,Ї A@P$P@X@4&P@4X@,YCX@$&P@$ CX#ю p,p(ЇX@X#8nP@C@PnPA@n#юp(endfilerecendinwriterecen file; .I buf is the address of a buffer into which information is placed concerning the file. It is unnecessary to have any permissions at all with respect to the file, but all directories leading to the file must be searchable. The layout of the structure pointed to by buf as defined in .I is given below. .I St_mode is encoded according to the `#define' statements. .PP .nf .so /usr/include/sys/stat.h .fi .PP The mode bits 0000070 and 0000007 encode group and others permissions (see .IR chmod (2)umped. If no date is determined by the level, the beginning of time is assumed; thus the option .B 0 causes the entire filesystem to be dumped. .TP 5 .B s The size of the dump tape is specified in feet. The number of feet is taken from the next .I argument. When the specified size is reached, the dump will wait for reels to be changed. The default size is 2300 feet. .TP 5 .B d The density of the tape, expressed in BPI, is taken from the next .I argument. This is used in calculating the amount of tape .mc |dstartintiioiyiyiyiy). The defined types, .I ino_t, off_t, time_t, name various width integer values; .I dev_t encodes major and minor device numbers; their exact definitions are in the include file (see .IR types (5). .PP When .I fildes is associated with a pipe, .I fstat reports an ordinary file with restricted permissions. The size is the number of bytes queued in the pipe. .PP .I st_atime is the file was last read. For reasons of efficiency, it is not set when a directory is searched, although this would be used per write. The default is 800. .mc .PP .DT If no arguments are given, the .I key is assumed to be .B 9u and a default file system is dumped to the default tape. .PP Now a short suggestion on how perform dumps. Start with a full level 0 dump .PP dump 0u .PP Next, periodic level 9 dumps should be made on an exponential progression of tapes. (Sometimes called Tower of Hanoi \- 1 2 1 3 1 2 1 4 ... tape 1 used every other time, tape 2 used every fourth, tape 3 used every eighth, etc.) .PP dump 9u .PP Whe 9IYy 9IYiy )9more logical. .I st_mtime is the time the file was last written or created. It is not set by changes of owner, group, link count, or mode. .I st_ctime is set both both by writing and changing the i-node. .SH "SEE ALSO" ls(1), filsys(5) .SH DIAGNOSTICS Zero is returned if a status is available; \-1 if the file cannot be found. .SH ASSEMBLER (stat = 18.) .br .B sys stat; name; buf .PP (fstat = 28.) .br (file descriptor in r0) .br .B sys fstat; buf n the level 9 incremental approaches a full tape (about 78000 blocks at 1600 BPI blocked 20), a level 1 dump should be made. .PP dump 1u .PP After this, the exponential series should progress as uninterrupted. These level 9 dumps are based on the level 1 dump which is based on the level 0 full dump. This progression of levels of dump can be carried as far as desired. .SH FILES default filesystem and tape vary with installation. .br /etc/ddate: record dump dates of filesystem/level. .SH "SEE ALSO" restor(1)YYyiyicptr$$icend$(svic$,icnum$0icpos$4z_getc"errno fatal z_putc"z_rnew"s_rsfi"c_si"reading .TH FILE 1 .SH NAME file \- determine file type .SH SYNOPSIS .B file file ... .SH DESCRIPTION .I File performs a series of tests on each argument in an attempt to classify it. If an argument appears to be ascii, .I file examines the first 512 bytes and tries to guess its language. .SH BUGS It often makes mistakes. In particular it often suggests that command files are C programs. , dump(5), dumpdir(1) .SH DIAGNOSTICS If the dump requires more than one tape, it will ask you to change tapes. Reply with a new-line when this has been done. .SH BUGS Sizes are based on 1600 BPI blocked tape. The raw magtape device has to be used to approach these densities. Read errors on the filesystem are ignored. Write errors on the magtape are usually fatal. The .I volname rd_ed doed rd_ned doned getn y_err"donewrec dorevert doend s_wsfi"Xw_ed w_ned putn z_wnew"fmtbuf pars_f fmt_bg formatte sequenti external scale cplus cblank e_rsfi"en_fio e_wsfi"Felist inquire.ojxT`p<ЇX .PP .B (*signal(sig, func))() .br .B (*func)(); .SH DESCRIPTION A signal is generated by some abnormal event, initiated either by user at a typewriter (quit, interrupt), by a program error (bus error, etc.), or by request of another program (kill). Normally all signals cause termination of the receiving process, but a .I signal call allows them either to be ignored or to cause an interrupt to a specified location. Hr the next n input lines, without filling. .ti 0 .li .de|xx no \- Define parameterless macro to be invoked by request `.xx' (definition ends on line beginning `\fB..\fR'). .ti 0 .li .ds yes no Double space; same as `.ls 2'. .ti 0 .li .ef|t no t=\*a\*a\*a\*a Even foot title becomes t. .ti 0 .li .eh|t no t=\*a\*a\*a\*a Even head title becomes t. .ti 0 .li .fi yes yes Begin filling output lines. .ti 0 .li .fo no t=\*a\*a\*a\*a All foot titles are t. .ti 0 .li .hc|c no none Hyphenation character becomes `c'. .4Pp(ЇX,X(PX0X(P X4X(PX8X(PX>16), tmpf); putc((char)(s>>8), tmpf); putc((char)s, tmpf); } umulation of offices, there was to be a frequent change in the persons who were to be a frequent change in the persons who were to compose the council, this would involve the mischiefs of a mutable administration in their full extent. Such a council would also be more liable to executive influence than the Senate, because they would be fewer in number, and would act less immediately under the public inspection. Such a council, in fine, as a substitute for the plan of the convention, would be productive of    ښ T̔SST$ extern double fabs(), floor(), ceil(), modf(), ldexp(), frexp(); extern double sqrt(), hypot(), atof(); extern double sin(), cos(), tan(), asin(), acos(), atan(), atan2(); extern double exp(), log(), log10(), pow(); extern double sinh(), cosh(), tanh(); extern double gamma(); extern double j0(), j1(), jn(), y0(), y1(), yn(); #define HUGE 7.0e75 /* fairly close, it will do */ #define LOGHUGE 76 an increase of expense, a multiplication of the evils which spring from favoritism and intrigue in the distribution of public honors, a decrease of stability in the administration of the government, and a diminution of the security against an undue influence of the executive. And yet such a council has been warmly contended for as an essential amendment in the proposed Constitution. I could not with propriety conclude my observations on the subject of appointments without taking notice of a scheme for    ґ NȎOO  N  $$ char myname[] = "research 11/70"; which there have appeared some, though #create memo4 but a few advocates; I mean that of uniting the House of Representatives in the power of making them. I shall, however, do little more than mention it, as I cannot imagine that it is likely to gain the countenance of any considerable part of the community. A body so fluctuating and at the same time so numerous can never be deemed proper for the exercise of that power. Its unfitness will appear manifest to all when it is recollected that in half a centu0,10,20,30,40,50 * * * * /etc/dmesg - >>/usr/adm/messages 0,5,10,15,20,25,30,35,40,45,50,55 * * * * /usr/lib/atrun 20 1 * * * /usr/bin/calendar - struct group { /* see getgrent(3) */ char *gr_name; char *gr_passwd; int gr_gid; char **gr_mem; }; ry it may consist of three or four hundred persons. All the advantages of the stability, both of the Executive and of the Senate, would be defeated by this union, and infinite delays and embarrassments would be occasioned. The exampled of most of the States in their local constitutions encourages us to reprobate the idea. The only remaining powers of the executive are comprehended in giving information to Congress of the state of the Union; in recommending to their consideration such measures as he sha0'xXP PX#3&"&PP@A@@PA@Xp\Ї<@PA@*pA@P@PA@PB0&@P@PA@P$PA@'xXP $PPPA@&xB0sC0't$PP PA@*&t$p,P8P4P 0P@,P PA@pB0XX@Y0BJX@Y0!8X@Y4B0X@Y0B0X@Y4!8X@Y8B PACXPA@RX@PAp$PA@юt_linep) #define TURNOFF pkturnoff(tp) #define UCOUNT u.u_count #define S tp #define P pk->p_ttyp #define SDEF struct tty *tp #define FS , tp #define SIGNAL signal(pk->p_ttyp->t_pgrp, SIGPIPE) #define TERROR pk->p_istate == R_ERROR #define SETERROR u.u_error = EIO #define OBUSY tp->t_state&BUSY #define ODEAD ((tp->t_state&CARR_ON)==0) char *getepack(); #define GETEPACK getepack(pk->p_bits) #define FREEPACK(a,b) freepack(a, bthe consideration of their having counteracted the good intentions of the executive. If an ill appointment should be made, the executive, for nominating, and the Senate, for approving, would participate, though in different degrees, in the opprobrium and disgrace. The reverse of all this characterizes the manner of appointment in this State. The council of appointment consists of from three to five persons, of whom the governor is always one. This small body, shut up in a private apartment, impenetrabp(ЇX0 !4$C@X,+#3$#$X,CPX(PAC #5$P#$PX(PA@+C X@B0PX(PA't$P$PPA@+&tCJ #5$P#$PX(PA@+C$$CtC@P@&U 3X #$CL$P ҽ  #9 C*X,r!8  #   #юp(p(ЇX(PPA@*X,C0" BPA@*$PPA@+ #юp(p(Ї C0U@!$#" #юp(p(Ї) #define q1 tp->t_rawq #define q2 tp->t_canq #define q3 tp->t_outq #define LOCK s = spl6() #define UNLOCK splx(s) #define DSYSTEM struct tty *p_ttyp #define ISYSTEM tp = pk->p_ttyp #define SLEEP(a, b) sleep((caddr_t)a, b) #define SLEEPNO (tp->t_chan!=NULL) #define WAKEUP(a) wakeup((caddr_t)a) #define IOMOVE(p, c, f) iomove(p, c, f) #define PKGETPKT(p) #define DTOM(a) dtom(a) #include "../h/param.h" #include "../h/dir.h" #include "../h/user.h" #include "../h/pk.h" #include "../h/tty.h" #include "..le to the public eye, proceed to the execution of the trust committed to them. It is known that the governor claims the right of nomination upon the strength of some ambiguous expressions in the Constitution; but it is not known to what extent, or in what manner he exercises it; nor upon what occasions he is contradicted or opposed. The censure of a bad appointment, on account of the uncertainty of its author and for want of a determinate object, has neither poignancy nor duration. And while an unboundedA@"X(PA@8юp(p@Ї X@h@`$& !2"-!3%#+!2#'$$/`$P & @C00hiC$ /l/!*`#&$Q C.B0B& @C0.hiC$ /l/!*`'$Q C$$E#5eB0N&+!3C -!3%#'& @C0$ ʰC#  $ #% Z #$/`$$/`$ /`à#7hl` #9hl`C#hm`#hl` #+k`h#ю p@p(Ї't/h/buf.h" #include "../h/proc.h" #endif /* * user level */ #ifdef USER #define SLEEP(a, b) #define SIGNAL #define WAKEUP(a) #define DSYSTEM int p_ifn, p_ofn #define ISYSTEM #define GETEPACK malloc(pk->p_xsize) #define FREEPACK(a, b) free(a) #define OBUSY 0 #define PKGETPKT(p) pkgetpack(p); #define DTOM(a) 1; #define S ipk, ibuf, icount #define SDEF int icount; char *ibuf; struct pack *ipk #define UCOUNT icount #define IOMOVE(p, c, f) pkmove(p, ibuf, c, f) ; ibuf += c; UCOUNT -= c #define PADDR ip field for cabal and intrigue lies open, all idea of responsibility is lost. The most that the public can know is that the governor claims the right of nomination; that two out of the inconsiderable number of four men can too often be managed without much difficulty; that if some of the members of a #create memo3 particular council should happen to be of an uncomplying character, it is frequently not impossible to get rid of their opposition by regulating the times of meeting in such a manner as to render X(PA&tPA#юp(p8ЇPA@+TX8XH></ PPAXȰ/ȠAPPApPPAbHC0 B ( !7X C B B0(X CQPAj$Q  #юp8p(ЇX(X,:BX PA  <[=Z=0$# / #юp(p(ЇX(XQX(XQ #Q' 4<P &<<P &<P&p$P@ L B$FPAk #define TURNOFF #define LOCK #define UNLOCK #define SETERROR #define GENERROR(p, s) #define PACKSIZE 64 #define WINDOWS 3 #define PKDEBUG(l, f, s) { extern Debug; if (Debug >= l) fprintf(stderr, f, s);} #define PKASSERT(e, f, v) if (!(e)) {\ fprintf(stderr, "AERROR - (%s) ", "e");\ fprintf(stderr, f, v);\ pkfail();}; #endif their attendance inconvenient; and that from whatever cause it may proceed, a great number of very improper appointments are from time to time made. Whether a governor of this State avails himself of the ascendant, he must necessarily have in this delicate and important part of the administration to prefer to offices men who are best qualified for them; or whether he prostitutes that advantage to the advancement of persons whose chief merit is their implicit devotion to his will and to the support of a des B PA &" CF C 'PA '" P@ HP@ PPAn!6P@$X@ !([@ &" P@ &P &P&$P@ T@ 4#юp(p(Ї < &&#2" X(X$V  && && &&&X(ʰX$l && && &&'X PPA'X dPPA'X dPPA'X dPPAX(Xd!2 0 &X(XdPPAL@ #юp(p(Ї/* * The user structure. * One allocated per process. * Contains all per process data * that doesn't need to be referenced * while the process is swapped. * The user block is USIZE*CLICK bytes * long; resides at virtual kernel * loc UBASE; contains the system * stack per user; is cross referenced * with the proc structure for the * same process. */ #define EXCLOSE 01 struct user { label_t u_rsav; /* save info when exchanging stacks */ int u_fper; /* FP error register */ int u_fpsaved; picable and dangerous system of personal influence are questions which, unfortunately for the community, can only be the subjects of speculation and conjecture. Every mere council of appointment, however constituted, will be a conclave in which cabal and intrigue will have their full scope. Their number, without an unwarrantable increase of expense, cannot be large enough to preclude a facility of combination. And as each member will have his friends and connections to provide for, the desire of mutualX(l$#4m#n#юp(p(ЇX(&X, B$X,$$0 &# &X,$0 & #юp(p(ЇX@ XB08@ \P@ X@ XP@ \@ \P@ d@ XP@ `X(&X@ `$P@ l$T B0,X$T !6X P "    !'   CX##C.Y@ d!5 X#6$CCX@ l&P@ l!#CP@ l$PA@,zX@ l  #$CX@ lPA@,z!4$CX@ dPX@ d& C0X@ dX/* FP regs saved for this proc */ struct { int u_fpregs[8]; /* FP registers */ int u_dpregs[16]; /* DP registers */ } u_fps; char u_segflg; /* IO flag: 0:user D; 1:system; 2:user I */ char u_error; /* return error code */ short u_uid; /* effective user id */ short u_gid; /* effective group id */ short u_ruid; /* real user id */ short u_rgid; /* real group id */ struct proc *u_procp; /* pointer to proc structure */ int *u_ap; /* pointer to arglist */ union { /* syscall return v gratification will beget a scandalous bartering of votes and bargaining for places. The private attachments of one man might easily be satisfied, but to satisfy the private attachments of a dozen, or of twenty men, would occasion a monopoly of all the principal employments of the government in a few families and would lead more directly to an aristocracy or an oligarchy than any measure that could be contrived. If, to avoid an accumulation of offices, there was to be a frequent change in the persons who X @ dPX@ l 'P P@ d@ XX@ dPC  P@ `U@ `C X@ `XP@ hX X@ `PX@ `P  &#юp(p(ЇX('P@ `X P юp(p4ЇX4$T @#5PAX @ PX8PA #3 !4 C~PP X8&U#PX'PC0$X&PXX. &P PCC$   BX@ h   P #юp4p0ЇPX0PA@)#$#$#юp0p(Ї'tX,Pt PX(PA@+x&t#юp(p(alues */ struct { int r_val1; int r_val2; }; off_t r_off; time_t r_time; } u_r; caddr_t u_base; /* base address for IO */ unsigned int u_count; /* bytes remaining for IO */ off_t u_offset; /* offset in file for IO */ struct inode *u_cdir; /* pointer to inode of current directory */ struct inode *u_rdir; /* root directory of current process */ char u_dbuf[DIRSIZ]; /* current pathname component */ caddr_t u_dirp; /* pathname pointer */ struct direct u_dent; /* current directorwere to be a frequent change in the persons who were to compose the council, this would involve the mischiefs of a mutable administration in their full extent. Such a council would also be more liable to executive influence than the Senate, because they would be fewer in number, and would act less immediately under the public inspection. Such a council, in fine, as a substitute for the plan of the convention, would be productive of an increase of expense, a multiplication of the evils which spring from faЇ'tX,PtPX(PA@+x&t#юp(p(ЇX(X,$Y0C0 &&B0&Y0#$ &" #&C #юp(XP@!$P@%X!$P@%XP@$XP@( !P@%X@#XX)!P@%XP@0P@4X@P@8,!P@%C!P@%P@ p$XP@@>8)) #define minor(x) (int)(x&0377) #define makedev(x,y) (dev_t)((xts other characteristics, and is satisfactorily deducible from these circumstances; the election of the President once in four years by persons immediately chosen by the people for that purpose, and his being at all times liable to impeachment, trial, dismission from office, incapacity to serve in any other, and to the forfeiture of life and estate by subsequent prosecution in the common course of law. But these precautions, great as they are, are not the only ones which the plan of the convention has provd'xXP PX#3&"&PP@A@PA@ Xp,Ї ,PA@ BP'xXX P XX&PXXX@P@PA@P&xю p,p,Ї PA@,XPAtPA@ BXCFQQXPADQQXPA.QQXPAC'B BX@0ю p,p(Ї't@P,PX(PA@&t@ #3%#$#юp(pЇXȾX C0hɐ%#6қ&CRžC *'xXP $)<<8|(y)) ided in favor of the public security. In the only instances in which the abuse of the executive authority was materially to be feared, the chief Magistrate of the United States, would, by that plan, be subjected to the control of a branch of the legislative body. What more can an enlightened and reasonable people desire? #copyin #user #uncopyin #match memo4 #log #next 1.1c 10 hL1.1c#print In this directory is a file named for an unsuccessful king. Read it and do what it tells you. #P PPA@&x$P& -!5$Q& P 0!60P&$ *B0X&&ӜC*Ӝɐ9B ɐ0B$ &CP$$Pɐ.B0P$Q&ӑɐ*B0X&&ӜC*ɐ9B "ɐ0B$ &ӜCPȾ C'|PXP XPPh `&A@&|CX &#4қ& PCrX& C0 #3&" PCLX&'C'|$ P$P XPʰ PX P&A&|C '|$ P$P XPʰ PX P&A&|C/* * A clist structure is the head * of a linked list queue of characters. * The characters are stored in 4-word * blocks containing a link and several characters. * The routines getc and putc * manipulate these structures. */ struct clist { int c_cc; /* character count */ char *c_cf; /* pointer to first char */ char *c_cl; /* pointer to last char */ }; /* * A tty structure is needed for * each UNIX character device that * is used for normal terminal IO. * The routines in tty.c handle the create Elizabeth1 1. She was not a king 2. She was generally successful #create George3 Does the file George3 contain a backspace character any where in it? Figure it out with grep, then type "answer N", where N is the line number where you found it. Type "answer 0" if there is no backspace. #copyin #user #uncopyin #match 2 #log #next 1.1d 10 aL1.1d #print Suppose you want to print all lines in the file "memo" that contain a question mark "?". Since the question mark is an abbreviat'|$P$P XPʰ PX P&AT&|C'|$P$P XPʰ PX P&A &|Cp'|P$P XPʰ PX P&A&|C:'|P$P XPʰ PX P&A&|C'|$ P$P XPʰ PX P&A&|C'|$ P$P XPʰ PX P&AL&|C& CH'|$ P$P XPʰ PX P&A&|C.'|$P$P XPʰ PX P&A&|C'|P$P XPʰ PX P&A&|C'|$ P$P XPʰ P * common code associated with * these structures. * The definition and device dependent * code is in each driver. (kl.c dc.c dh.c) */ struct tc { char t_intrc; /* interrupt */ char t_quitc; /* quit */ char t_startc; /* start output */ char t_stopc; /* stop output */ char t_eofc; /* end-of-file */ char t_brkc; /* input delimiter (like nl) */ }; struct tty { struct clist t_rawq; /* input chars right off device */ struct clist t_canq; /* input chars after erase and kill */ struct clist t_outqion character (as in "ls ?"), you have to make sure that the command interpreter doesn't try to interpret it, but instead passes it to "grep" as a literal question mark. The way to do this is simply to enclose it in quotes, as in grep '?' files... Use "grep" to find all the lines with question marks, then type "ready". #create memo (This comes from a federalist paper by alexander hamilton.) It has been mentioned as one of the advantages to be expected from the cooperation of the Senate, in the businX P&Ap&|CɐlB04'|$ P$P XPʰ PX P&A4&|C0'|$ P$P XPʰ PX P&A&|'CC@P@&U 3XC, #4қ&CC@P@(&U 3XD sB0X#8Y#%X [#"$X#4 '|XPXP P PPA@&|Ⱦ&CžC *'xXP $P PPA@&xюpp(ЇX(X,X4X8 #7 # #'$ @p $ B0X0C0 #6'0  C0 #'-  #ю; /* output list to device */ int (* t_oproc)(); /* routine to start output */ int (* t_iproc)(); /* routine to start input */ struct chan *t_chan; /* destination channel */ caddr_t t_linep; /* aux line discipline pointer */ caddr_t t_addr; /* device address */ dev_t t_dev; /* device number */ short t_flags; /* mode, settable by ioctl call */ short t_state; /* internal state, not visible externally */ short t_pgrp; /* process group name */ char t_delct; /* number of delimiters in raw q */ charess of appointments, that it would contribute to the stability of the administration. The consent of that body would be necessary to displace as well as to appoint. A change of the Chief Magistrate, therefore, would not occasion so violent or so general a revolution in the officers of the government as might be expected if he were the sole disposer of offices. Where a man in any station had given satisfactory evidence of his fitness for it, a new President would be restrained from attempting a change in p(p(ЇX,? $ юp(p(ЇX(X,X4X0C -B0FX80B0:%Q B X&P&CP P&A@ L'%Q BX8X&P# PX8PA@ L$Q0Cj'B<%Q B X&P&CP P&A@ LCX0C0<%Q BX8X&P# PX8PA@ L%Q0Cюp(p,Ї X0 C0  C04X,$'tPP PA@<&t$P CXB0B0<@PA@ t_line; /* line discipline */ char t_col; /* printing column of device */ char t_erase; /* erase character */ char t_kill; /* kill character */ char t_char; /* character temporary */ char t_ispeed; /* input speed */ char t_ospeed; /* output speed */ union { struct tc; struct clist t_ctlq; } t_un; }; #define tun tp->t_un /* * structure of arg for ioctl */ struct ttiocb { char ioc_ispeed; char ioc_ospeed; char ioc_erase; char ioc_kill; int ioc_flags; }; #define TTIPRI 28 #define TTOfavor of a person more agreeable to him by the apprehension that a discountenance of the Senate might frustrate the attempt, and bring some degree of discredit upon himself. Those who can best estimate the value of a steady administration will be most disposed to prize a provision which connects the official existence of public men with the approbation or disapprobation of that body which, from the greater permanency of its own composition, will in all probability be less subject to inconstancy than any ot#9  C@P @P CrPA@ P !9  CH  $C,X C P'tPP PA@<&tP X, &P C0 %#X,#ю p,p(ЇX( B0PXC0HX C </ PPAXȰ/ȠAPPApPPAbHC0 B ( !7X C B B0(X CQPAj$Q  #юp8p(ЇX(X,:BX PA  <[=Z=0$# / #юp(p(ЇX(XQX(XQ #Q'<P &<<P &define LCASE 04 #define ECHO 010 #define CRMOD 020 #define RAW 040 #define ODDP 0100 #define EVENP 0200 #define NLDELAY 001400 #define TBDELAY 006000 #define XTABS 006000 #define CRDELAY 030000 #define VTDELAY 040000 /* Hardware bits */ #define DONE 0200 #define IENABLE 0100 /* Internal state bits */ #define TIMEOUT 01 /* Delay timeout in progress */ #define WOPEN 02 /* Waiting for open to complete */ #define ISOPEN 04 /* Device is open */ #define FLUSH 010 /* outq has been flushed during DMA */ #defier of restraining him. This is an absurdity in terms. It cannot admit of a doubt that the entire power of appointment would enable him much more effectually to establish a dangerous empire over that body than a mere power of nomination subject to their control. Let us take a view of the converse of the proposition: "the Senate would influence the executive." As I have had occasion to remark in several other instances, the indistinctness of the objection forbids a precise answer. In what manner is th<P&p$P@ B$FPA B PA &" CF C 'PA '" P@P@PAn!6P@$X@ !([@&" P@ &P &P&$P@@#юp(p(Ї &&#2" X(X$ && && &&&X(ʰX$, && && &&'X PPA'X dPPA'X dPPA'X dPPAX(Xd!2ne CARR_ON 020 /* Software copy of carrier-present */ #define BUSY 040 /* Output in progress */ #define ASLEEP 0100 /* Wakeup when output done */ #define XCLUDE 0200 /* exclusive-use flag against open */ #define TTSTOP 0400 /* Output stopped by ctl-s */ #define HUPCLS 01000 /* Hang up upon last close */ #define TBLOCK 02000 /* tandem queue blocked */ #define DKCMD 04000 /* datakit command channel */ #define DKMPX 010000 /* datakit user-multiplexed mode */ #define DKCALL 020000 /* datakit dial modeis influence to be exerted? In relation to what objects? The power of influencing a person, in the sense in which it is here used, must imply a power of conferring a benefit upon him. How could the Senate confer a benefit upon the President by the manner of employing their right of negative upon his nominations? If it be said they might sometimes gratify him by an acquiescence in a favorite choice, when public motives might dictate a different conduct, I answer that the instances in which the President 0 &X(XdPPAL@#юp(p(ЇX(l$#4m#n#юp(p(ЇX(&X, B$X,$$0 &# &X,$0 & #юp(p(ЇX@B08@P@@P@@P@@P@X(&X@$P@$T B0,X$T !6X P "    !'   CX##C.Y@!5#6$CCX@&P@!#CP@$PA@X@  #$CX@ */ #define DKLINGR 040000 /* datakit lingering close mode */ #define CNTLQ 0100000 /* interpret t_un as clist */ /* * tty ioctl commands */ #define TIOCGETD (('t'<<8)|0) #define TIOCSETD (('t'<<8)|1) #define TIOCHPCL (('t'<<8)|2) #define TIOCMODG (('t'<<8)|3) #define TIOCMODS (('t'<<8)|4) #define TIOCGETP (('t'<<8)|8) #define TIOCSETP (('t'<<8)|9) #define TIOCSETN (('t'<<8)|10) #define TIOCEXCL (('t'<<8)|13) #define TIOCNXCL (('t'<<8)|14) #define TIOCFLUSH (('t'<<8)|16) #define TIOCSETC (('t'<<8)|17) could be personally interested in the result would be too few to admit of his being materially affected by the #create Ref what manner is this influence to be exerted? In relation to what objects? The power of influencing a person, in their right of negative upon his nominations? If it #create 1 #create x #copyout #user #uncopyout tail -3 .ocopy >X1 #cmp X1 Ref #log #next 2.1a 10 L2.1a#print Most of the programs we have studied so far produce their output on the terminal -- examplePA@!4$CX@PX@& C0X@XX @PX@ 'P P@@X@PC  P@U@C X@XP@X X@PX@P  &#юp(p(ЇX('P@X P юp(p4ЇX4$T @#5PAX @ PX8PA #3 !4 C~PP X8&U#PX'PC0$X&PXX. &P PCC$   BX@   P #юp4p0ЇPX0PA@#$#$#юp0#define TIOCGETC (('t'<<8)|18) #define DIOCLSTN (('d'<<8)|1) #define DIOCNTRL (('d'<<8)|2) #define DIOCMPX (('d'<<8)|3) #define DIOCNMPX (('d'<<8)|4) #define DIOCSCALL (('d'<<8)|5) #define DIOCRCALL (('d'<<8)|6) #define DIOCPGRP (('d'<<8)|7) #define DIOCGETP (('d'<<8)|8) #define DIOCSETP (('d'<<8)|9) #define DIOCLOSE (('d'<<8)|10) #define DIOCTIME (('d'<<8)|11) #define DIOCRESET (('d'<<8)|12) #define FIOCLEX (('f'<<8)|1) #define FIONCLEX (('f'<<8)|2) #define MXLSTN (('x'<<8)|1) #define MXNBLK (('x'<<8)|s are "ls", "spell", "grep", "date", "who", and so on. (Of course, some do not, like "mv", "cp", and "rm".) In any case, it is sometimes useful to be able to capture the output of a program in a file, so it can be used in some later processing. This is very easy. For example, to get the current date and time in a file called "now", you need only type date >now The symbol ">" tells the command interpreter that output is to go into the file whose name follows. If the file already exists, its old cont2) ents will be clobbered, so use discretion. Your task is to make a list of the files in this directory in the file "foo". When you have finished, type "ready". #create X1 #create junk #create glop #create junk1 asdfadfaf #create junk2 qerqerqrq #user ls >X1 #cmp X1 foo #log #next 2.1b 10 eL2.1b #print Now make a list of the files in this directory whose names begin with "t" in the file "foo". Type "ready" when you are done. #create X1 #create foo #create this #create Ref that theother p(Ї'tX,Pt PX(PA@&t#юp(p(Ї'tX,PtPX(PA@&t#юp(X!$P@%XP@XT!P@%XP@`XP@dXP@h\!P@%XP@plBBX@pP@tX@tX? P@pl!X@tZP@tP@% X'?PXP@|XP@Xx!P@%/* * Structure returned by times() */ struct tms { time_t tms_utime; /* user time */ time_t tms_stime; /* system time */ time_t tms_cutime; /* user time, children */ time_t tms_cstime; /* system time, children */ }; this #create that #create theother #user #cmp foo Ref #log #next 2.1c 10 1L2.1cV#print This time you have to get a list of the files whose names begin with "memo", but sorted in order of last change, most recent first, as produced by "ls -t". Get the list in file "gorp", then type "ready". #create memo1 first line #create memo3 third line #create memo2 second line #user ls -t memo* >X1 #cmp X1 gorp #log #next 2.1d 10 L2.1d#print If you type "ls >list", does the 8?FMT[bipw~[Jj]an[Ff]eb[Mm]ar[Aa]pr[Mm]ay[Jj]un[Jj]ul[Aa]ug[Ss]ep[Oo]ct[Nn]ov[Dd]ec(^|[ (,;])((%s[^ ]* *|%d/)0*%d)([^0123456789]|$) doux&ZDLOUXcdefglorsux~&xlFH0123456789ABCDEF/* * Structure returned by ftime system call */ struct timeb { time_t time; unsigned short millitm; short timezone; short dstflag; }; name "list" appear in the file called "list"? Figure it out, then type yes or no. #copyin #user #uncopyin #match yes #log #next 2.1e 10 iL2.1e#print If you make a mistake and type something like xxxxx >precious where "xxxxx" is not___ the name of a legal UNIX command, what happens to the file "precious"? In this directory, there are several precious files. Experiment to see what happens. When you have decided, type "answer harmless" if nothing happens to the files, or "answDay Mon 00 00:00:00 1900 SunMonTueWedThuFriSatJanFebMarAprMayJunJulAugSepOctNovDec#6/* * Text structure. * One allocated per pure * procedure on swap device. * Manipulated by text.c */ struct text { short x_daddr; /* disk address of segment (relative to swplo) */ short x_caddr; /* core address, if loaded */ short x_size; /* size (clicks) */ struct inode *x_iptr; /* inode of prototype */ char x_count; /* reference count */ char x_ccount; /* number of loaded references */ char x_flag; /* traced, written flags */ }; extern struct text text[]; #define XTRC 01 /* Text may be wrer disaster" if the file is clobbered. #create precious I am precious. #create precious1 So am I. #create precious2 Me too. #copyin #user #uncopyin #match disaster #log #next 2.1f 10 eL2.1f+#print Obtain a long listing (with "ls -l") of all files in this directory whose names begin with capital letters, in a file called "names". Type "ready" when you're done. #create STUFF #create Nonsense this is junk #create abc #create def # ls -l [A-Z]* >x1 #user #cmp x1 names #log #next 3.1a 10 l&T*'xXP PX#3&"&PP@XA@@PA@ Xp(ЇX,X-B0\X,XC$$P@*C2$P@*C&$P@*C@ P@&U 3X $Q,%Q(X(C&@(P@PA@p$PA@ @\PX,XPA@PX,XPA$B b@:PZ,X PA@P@)B0,Z,X P@" can be used by most programs to capture output on a file. For example, cat henry >james makes a copy of "henry" in the file "james"; in fact this is essentially identical to cp henry james "cat" is a bit more flexible, though, since you can concatenate several files onto one output. Remember that cat tom dick harry copies all three files onto the terminal? In this directory is a file named "john". Make a file called "mary" that contains _C08B&@TP@PA@p$PA@ @(PPAFPPX,B0$QPAPX&P PAPPX,B0$QPAP a!4$Q d!4$Q$Q$QXZDPXZDPXZDPXZDP &CZDX@-$Z.DPZDX@-$Z.DPX@)PA@z #ю p@p(Ї$X(XPA:C0&$X>(X#&P" C #юp(p(ЇX(0!X/* * Random set of variables * used by more than one * routine. */ char canonb[CANBSIZ]; /* buffer for erase and kill (#@) */ struct inode *rootdir; /* pointer to inode of root directory */ struct proc *runq; /* head of linked list of running processes */ int cputype; /* type of cpu */ int lbolt; /* time of day in HZ not in time */ time_t time; /* time in sec from 1970 */ /* * Nblkdev is the number of entries * (rows) in the block switch. It is * set in binit/bio.c by making * a pass over th__two copies of "john". Type "ready" when you're done. #create john Now is the time for all good men to come to the aid of their party #create X1 Now is the time for all good men to come to the aid of their party Now is the time for all good men to come to the aid of their party #user #cmp X1 mary #log #next 3.1b 10 rL3.1b#print How many spelling mistakes are there in the file "Ref", according to "spell"? Type "answer N", where N is the number you decide on. #create Ref Bianchi Blu(9##$#$#юp(p(ЇX(PA.C0@(PA#3$#C$#юp(p(Ї$CdX(%QBX.(X&P# X(PA@ C0"@( B0&$ @( #&C$#юp(p8Ї\$PX8\ !#$#$P X<!#$#$PC0hX@ C0XpX P X PX PX PX PX P X PX P@mPA@pXC0X C0zX Y CnX@*B0\@PA't$PP$PA&t't &PP$PADe switch. * Used in bounds checking on major * device numbers. */ int nblkdev; /* * Number of character switch entries. * Set by cinit/tty.c */ int nchrdev; int mpid; /* generic for unique process id's */ char runin; /* scheduling flag */ char runout; /* scheduling flag */ char runrun; /* scheduling flag */ char curpri; /* more scheduling */ int maxmem; /* actual max memory per process */ caddr_t memtop; /* highest memory address */ int freemem; /* free memory (CLICKS) - for display oe Feldman McIlroy Roome Rosin Rosler Aho Bourne Dvorak Haley Harris Holt Johnson Mashey Mitze Muha Nelson Pinson Plauger Spivack Thompson Weinberger Lesk Ossanna # spell Ref | %s/../lcount >X2 & #copyin #user #uncopyin tail -1 .copy >X1 #cmp X2 X1 #log #next 3.1c 10 nL3.1c#print So far the only printing program we have seen is "cat", which just copies one or more files onto the terminal (or perhaps onto a file when used with ">"). The next step up is the program "pr", which prints fil&t't$P &P$PA&tCX C0XC0zX Y CnX@*B0\@PAf't &PP$PA&t't$PP$PAb&t't$P &P$PAF&tCP X8\C$X Y BX P X P C X<C$X Y BX P X P CX Y B0X Y B0PPAPX@*B0X#7@P#@PAF'tXPP$PAZ&t't$PP$PAB&tX Y ## # 't$P &P$PA&tC 'tXPXPPA&tPnly */ physadr lks; /* pointer to clock device */ daddr_t swplo; /* block number of swap space */ int nswap; /* size of swap space */ int updlock; /* lock for sync */ daddr_t rablock; /* block to be read ahead */ extern int regloc[]; /* locs. of saved user registers (trap.c) */ char msgbuf[MSGBUFS]; /* saved "printf" characters */ dev_t rootdev; /* device of the root */ dev_t swapdev; /* swapping device */ dev_t pipedev; /* pipe device */ extern int icode[]; /* user init code */ extern int szicodes so that each file begins on a new page, and the top of each page contains the date and time the file was changed, and a running page number. Use a single "pr" to print the two files in this directory whose names begin with "fed". What page number is printed on the last page? Type "answer N" where N is the page number. #create fed1 After an unequivocal experience of the inefficacy of the subsisting federal government, you are called upon to deliberate on a new Constitution for the United States of AmeCX Y CX X[ P X P C&X Y CX X[ P X P X Y C X [ Q X P C X Y C X [ Q X P C^X@*#7XPA,юp8p(ЇX(P@PA@юp(p(ЇX(P@PA@X,XX.("P@)X,PAjX0B0XX@ B0N%Q('t$PX,XPX(PA@&t't@PX,XPX(PA&tюp(p(ЇX(XX.(YB "X(X'P@PA@CbX(XP@PA@X(XX.(e; /* its size */ dev_t getmdev(); daddr_t bmap(); struct inode *ialloc(); struct inode *iget(); struct inode *owner(); struct inode *maknode(); struct inode *namei(); struct buf *alloc(); struct buf *getblk(); struct buf *geteblk(); struct buf *bread(); struct buf *breada(); struct filsys *getfs(); struct file *getf(); struct file *falloc(); int uchar(); /* * Instrumentation */ int dk_busy; long dk_time[32]; long dk_numb[3]; long dk_wds[3]; long tk_nin; long tk_nout; /* * Structure of the system-entryrica. The subject speaks its own importance; comprehending in its consequences nothing less than the existence of the union, the safety and welfare of the parts of which it is composed, the fate of an empire in many respects the most interesting in the world. #create fed2 It has been frequently remarked that it seems to have been reserved to the people of this country, by their conduct and example, to decide the important question, whether societies of men are really capable or not of establishing good govX"&! C X(X'P@PA@@PA@юp(p0ЇX@*X0[@)X8X PX8X P 't$PPX0PAR&tюp0p(Ї$X(X@)X.,'! C^X(X@)PA!3AX0C0&'t@(PX0P@PA@&tX($Q@) C #юp(p,Ї X,XX.,[X.0X"X>0[# #4$C 't$PX,XP$PA&t't$PX0XP$PA&t$$PX,XX.,[YC X@)%QBX @)X&P# X@)P table */ extern struct sysent { char sy_narg; /* total number of arguments */ char sy_nrarg; /* number of args in registers */ int (*sy_call)(); /* handler */ } sysent[]; ernment from reflection and choice, or whether they are forever destined to depend for their political constitutions on accident and force. If there be any truth in the remark, the crisis at which we are arrived may with propriety be regarded as the era in which that decision is to be made; and a wrong election of the part we shall act may, in this view, deserve to be considered as the general misfortune of mankind. #copyin #user #uncopyin #match 1 #log #next 3.1d L3.1d#print The pr A@ X@)%QBX @)X&P# X@)PA@ #4!3A& #7PA,C B0V$QC4PA$#ю p,p(Ї$C.'t$P [(PX@)PA@&t&Cюp(p(Ї@P@PA@pA@ (юp(p(ЇX,&T@*!5X0C$Q0X(XX.0$P@\X(XX.0$P@`'t$PX(XP$PA&&tX0Z@XX0P@d't$PX(X P$PA&tX0Z@dX0P@hX0#юp(p(ЇX(P(X(C X(struct stat { dev_t st_dev; ino_t st_ino; unsigned short st_mode; short st_nlink; short st_uid; short st_gid; dev_t st_rdev; off_t st_size; time_t st_atime; time_t st_mtime; time_t st_ctime; }; #define S_IFMT 0170000 /* type of file */ #define S_IFDIR 0040000 /* directory */ #define S_IFCHR 0020000 /* character special */ #define S_IFBLK 0060000 /* block special */ #define S_IFREG 0100000 /* regular */ #define S_IFMPC 0030000 /* multiplexed char special */ #define S_IFMPB 0070000 /* mcommand has a number of other capabilities besides simple printing of files. Probably the most useful is that it can do multi-column printing. This is controlled by an optional argument: pr -3 filenames will print in 3-column format, and pr -5 filenames prints in five columns. You can use any number in place of 3 and 5, although as you get more columns they become narrower so things will fit. Notice that the optional argument comes ______before the files names. In this directory there is a li\PA't$PX(X@dPX@)PA@&tX(X@hX.($[@d C j#$# 'xX@)P P$PPA@&x #3AH'x@P P$PPA@P&x C@PA@%Q(Cюp(p0ЇX0 C0X8CX C0 B0XX4P X8B0.'t$P$P PA@$&tP [Q #X4 P4 B0: C 4X B *X [ Y B X Q X [ P $C C0X P 'tX8PX4P PA@$ultiplexed block special */ #define S_ISUID 0004000 /* set user id on execution */ #define S_ISGID 0002000 /* set group id on execution */ #define S_ISVTX 0001000 /* save swapped text even after use */ #define S_IREAD 0000400 /* read permission, owner */ #define S_IWRITE 0000200 /* write permission, owner */ #define S_IEXEC 0000100 /* execute/search permission, owner */ st of words. Find the list, print it in two columns, and find out what word appears at the top of the second column. Type "answer WORD", where WORD is the word you decide on. #create wordlist a aardvark aardwolf Aaron Aaronic Ab aba abaca abaci aback abacus abacuses abaft abalone abandon abandoned abandoner abandonment abase abasement abash abashment abate abatement abater abatis abatises abattoir abaxial abbacy Abbasid abbatial abbe' abbess Abbevillian abbey abbot abbreviate abbreviation abbreviator Abb&tP $P Cb C0VPA@ C0$P  X P 'tX8PX4P PA@$&tP X !3%#$#юp0p(Ї'tX(P0PX,PA@&tX(  #3%#$#юp(p(Ї't@P,PX(PA@&t@ #3%#$#юp(pЇXȾX C0hɐ%#6қ&CRžC *'xXP $P PPA@|&x$P& -!5$Q& P 0!60P&$ *B0X&&ӜC*Ӝɐ9B ɐ0B$ /* * Segmentation hardware definitions */ physadr uisa; /* first user segmentation register */ physadr kisa; /* first kernel segmentation register */ #define SEGMASK 0xfff00 /* segment start address */ #define SEGEP 0x80 /* execute protect */ #define SEGIP 0x40 /* write-interrupt protect */ #define SEGWP 0x20 /* write protect */ #define SEGPRES 0x10 /* present */ #define RO (SEGWP|SEGPRES) /* access abilities */ #define RW SEGPRES #define TX 0x01 /* Software: text segment */ #define ABS 0y Abc Abcs Abc's abdicable abdicate abdication abdicator abdomen abdominal abdominally abdominous abduce abducent abduct abduction abductor abeam abecedarian abed Abel abele abelmosk aberrance aberrancy aberrant aberrantly aberration aberrational abet abetment abetted abetter abetting abettor abeyance abeyant abhominable abhor abhorred abhorrence abhorrent abhorrently abhorrer abhorring Abib abidance abide abided abider abiding Abigail abigail ability abiogeneses abiogenesis abiogenetic abiogenetical abioge &CP$$Pɐ.B0P$Q&ӑɐ*B0X&&ӜC*ɐ9B "ɐ0B$ &ӜCPȾ C'|PXP XPPh `&A@T&|CX &#4қ& PCrX& C0 #3&" PCLX&'C'|$ P$P XPʰ PX P&A&|C '|$ P$P XPʰ PX P&A&|C'|$P$P XPʰ PX P&AT&|C'|$P$P XPʰ PX P&A &|Cp'|P$P XPʰ PX P&Ax02 /* Software: absolute address */ physadr ka6; /* pointer to u segment register */ netically abiogenist #copyin #user #uncopyin #create script /^a/s/.* // .w X1 w q # pr -2 wordlist >foo ed - foo