home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was processed as: LaTeX Document
(document/latex).
You can browse this item here: tex
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| LaTeX Document (document/latex)
| magic
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| LaTeX document text
| default
| |
99%
| file
| LaTeX document, ASCII text
| default
| |
100%
| checkBytes
| Printable ASCII
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| siegfried
| fmt/281 LaTeX (Subdocument)
| default
| |
100%
| detectItEasy
| Format: plain text[LF]
| default (weak)
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 5c 73 65 63 74 69 6f 6e | 7b 53 74 61 6e 64 61 72 |\section|{Standar|
|00000010| 64 20 4d 6f 64 75 6c 65 | 20 5c 73 65 63 74 63 6f |d Module| \sectco|
|00000020| 64 65 7b 74 65 6d 70 66 | 69 6c 65 7d 7d 0a 5c 73 |de{tempf|ile}}.\s|
|00000030| 74 6d 6f 64 69 6e 64 65 | 78 7b 74 65 6d 70 66 69 |tmodinde|x{tempfi|
|00000040| 6c 65 7d 0a 5c 69 6e 64 | 65 78 69 69 7b 74 65 6d |le}.\ind|exii{tem|
|00000050| 70 6f 72 61 72 79 7d 7b | 66 69 6c 65 20 6e 61 6d |porary}{|file nam|
|00000060| 65 7d 0a 5c 69 6e 64 65 | 78 69 69 7b 74 65 6d 70 |e}.\inde|xii{temp|
|00000070| 6f 72 61 72 79 7d 7b 66 | 69 6c 65 7d 0a 0a 5c 72 |orary}{f|ile}..\r|
|00000080| 65 6e 65 77 63 6f 6d 6d | 61 6e 64 7b 5c 69 6e 64 |enewcomm|and{\ind|
|00000090| 65 78 73 75 62 69 74 65 | 6d 7d 7b 28 69 6e 20 6d |exsubite|m}{(in m|
|000000a0| 6f 64 75 6c 65 20 74 65 | 6d 70 66 69 6c 65 29 7d |odule te|mpfile)}|
|000000b0| 0a 0a 54 68 69 73 20 6d | 6f 64 75 6c 65 20 67 65 |..This m|odule ge|
|000000c0| 6e 65 72 61 74 65 73 20 | 74 65 6d 70 6f 72 61 72 |nerates |temporar|
|000000d0| 79 20 66 69 6c 65 20 6e | 61 6d 65 73 2e 20 20 49 |y file n|ames. I|
|000000e0| 74 20 69 73 20 6e 6f 74 | 20 5c 55 4e 49 58 7b 7d |t is not| \UNIX{}|
|000000f0| 20 73 70 65 63 69 66 69 | 63 2c 0a 62 75 74 20 69 | specifi|c,.but i|
|00000100| 74 20 6d 61 79 20 72 65 | 71 75 69 72 65 20 73 6f |t may re|quire so|
|00000110| 6d 65 20 68 65 6c 70 20 | 6f 6e 20 6e 6f 6e 2d 5c |me help |on non-\|
|00000120| 55 4e 49 58 7b 7d 20 73 | 79 73 74 65 6d 73 2e 0a |UNIX{} s|ystems..|
|00000130| 0a 4e 6f 74 65 3a 20 74 | 68 65 20 6d 6f 64 75 6c |.Note: t|he modul|
|00000140| 65 73 20 64 6f 65 73 20 | 6e 6f 74 20 63 72 65 61 |es does |not crea|
|00000150| 74 65 20 74 65 6d 70 6f | 72 61 72 79 20 66 69 6c |te tempo|rary fil|
|00000160| 65 73 2c 20 6e 6f 72 20 | 64 6f 65 73 20 69 74 0a |es, nor |does it.|
|00000170| 61 75 74 6f 6d 61 74 69 | 63 61 6c 6c 79 20 72 65 |automati|cally re|
|00000180| 6d 6f 76 65 20 74 68 65 | 6d 20 77 68 65 6e 20 74 |move the|m when t|
|00000190| 68 65 20 63 75 72 72 65 | 6e 74 20 70 72 6f 63 65 |he curre|nt proce|
|000001a0| 73 73 20 65 78 69 74 73 | 20 6f 72 20 64 69 65 73 |ss exits| or dies|
|000001b0| 2e 0a 0a 54 68 65 20 6d | 6f 64 75 6c 65 20 64 65 |...The m|odule de|
|000001c0| 66 69 6e 65 73 20 61 20 | 73 69 6e 67 6c 65 20 75 |fines a |single u|
|000001d0| 73 65 72 2d 63 61 6c 6c | 61 62 6c 65 20 66 75 6e |ser-call|able fun|
|000001e0| 63 74 69 6f 6e 3a 0a 0a | 5c 62 65 67 69 6e 7b 66 |ction:..|\begin{f|
|000001f0| 75 6e 63 64 65 73 63 7d | 7b 6d 6b 74 65 6d 70 7d |uncdesc}|{mktemp}|
|00000200| 7b 7d 0a 52 65 74 75 72 | 6e 20 61 20 75 6e 69 71 |{}.Retur|n a uniq|
|00000210| 75 65 20 74 65 6d 70 6f | 72 61 72 79 20 66 69 6c |ue tempo|rary fil|
|00000220| 65 6e 61 6d 65 2e 20 20 | 54 68 69 73 20 69 73 20 |ename. |This is |
|00000230| 61 6e 20 61 62 73 6f 6c | 75 74 65 20 70 61 74 68 |an absol|ute path|
|00000240| 6e 61 6d 65 20 6f 66 20 | 61 0a 66 69 6c 65 20 74 |name of |a.file t|
|00000250| 68 61 74 20 64 6f 65 73 | 20 6e 6f 74 20 65 78 69 |hat does| not exi|
|00000260| 73 74 20 61 74 20 74 68 | 65 20 74 69 6d 65 20 74 |st at th|e time t|
|00000270| 68 65 20 63 61 6c 6c 20 | 69 73 20 6d 61 64 65 2e |he call |is made.|
|00000280| 20 20 4e 6f 20 74 77 6f | 20 63 61 6c 6c 73 0a 77 | No two| calls.w|
|00000290| 69 6c 6c 20 72 65 74 75 | 72 6e 20 74 68 65 20 73 |ill retu|rn the s|
|000002a0| 61 6d 65 20 66 69 6c 65 | 6e 61 6d 65 2e 0a 5c 65 |ame file|name..\e|
|000002b0| 6e 64 7b 66 75 6e 63 64 | 65 73 63 7d 0a 0a 54 68 |nd{funcd|esc}..Th|
|000002c0| 65 20 6d 6f 64 75 6c 65 | 20 75 73 65 73 20 74 77 |e module| uses tw|
|000002d0| 6f 20 67 6c 6f 62 61 6c | 20 76 61 72 69 61 62 6c |o global| variabl|
|000002e0| 65 73 20 74 68 61 74 20 | 74 65 6c 6c 20 69 74 20 |es that |tell it |
|000002f0| 68 6f 77 20 74 6f 20 63 | 6f 6e 73 74 72 75 63 74 |how to c|onstruct|
|00000300| 20 61 0a 74 65 6d 70 6f | 72 61 72 79 20 6e 61 6d | a.tempo|rary nam|
|00000310| 65 2e 20 20 54 68 65 20 | 63 61 6c 6c 65 72 20 6d |e. The |caller m|
|00000320| 61 79 20 61 73 73 69 67 | 6e 20 76 61 6c 75 65 73 |ay assig|n values|
|00000330| 20 74 6f 20 74 68 65 6d | 3b 20 62 79 20 64 65 66 | to them|; by def|
|00000340| 61 75 6c 74 20 74 68 65 | 79 0a 61 72 65 20 69 6e |ault the|y.are in|
|00000350| 69 74 69 61 6c 69 7a 65 | 64 20 61 74 20 74 68 65 |itialize|d at the|
|00000360| 20 66 69 72 73 74 20 63 | 61 6c 6c 20 74 6f 20 5c | first c|all to \|
|00000370| 63 6f 64 65 7b 6d 6b 74 | 65 6d 70 28 29 7d 2e 0a |code{mkt|emp()}..|
|00000380| 0a 5c 62 65 67 69 6e 7b | 64 61 74 61 64 65 73 63 |.\begin{|datadesc|
|00000390| 7d 7b 74 65 6d 70 64 69 | 72 7d 0a 57 68 65 6e 20 |}{tempdi|r}.When |
|000003a0| 73 65 74 20 74 6f 20 61 | 20 76 61 6c 75 65 20 6f |set to a| value o|
|000003b0| 74 68 65 72 20 74 68 61 | 6e 20 5c 63 6f 64 65 7b |ther tha|n \code{|
|000003c0| 4e 6f 6e 65 7d 2c 20 74 | 68 69 73 20 76 61 72 69 |None}, t|his vari|
|000003d0| 61 62 6c 65 20 64 65 66 | 69 6e 65 73 20 74 68 65 |able def|ines the|
|000003e0| 0a 64 69 72 65 63 74 6f | 72 79 20 69 6e 20 77 68 |.directo|ry in wh|
|000003f0| 69 63 68 20 66 69 6c 65 | 6e 61 6d 65 73 20 72 65 |ich file|names re|
|00000400| 74 75 72 6e 65 64 20 62 | 79 20 5c 63 6f 64 65 7b |turned b|y \code{|
|00000410| 6d 6b 74 65 6d 70 28 29 | 7d 20 72 65 73 69 64 65 |mktemp()|} reside|
|00000420| 2e 20 20 54 68 65 0a 64 | 65 66 61 75 6c 74 20 69 |. The.d|efault i|
|00000430| 73 20 74 61 6b 65 6e 20 | 66 72 6f 6d 20 74 68 65 |s taken |from the|
|00000440| 20 65 6e 76 69 72 6f 6e | 6d 65 6e 74 20 76 61 72 | environ|ment var|
|00000450| 69 61 62 6c 65 20 5c 63 | 6f 64 65 7b 54 4d 50 44 |iable \c|ode{TMPD|
|00000460| 49 52 7d 3b 20 69 66 20 | 74 68 69 73 0a 69 73 20 |IR}; if |this.is |
|00000470| 6e 6f 74 20 73 65 74 2c | 20 65 69 74 68 65 72 20 |not set,| either |
|00000480| 5c 63 6f 64 65 7b 2f 75 | 73 72 2f 74 6d 70 7d 20 |\code{/u|sr/tmp} |
|00000490| 69 73 20 75 73 65 64 20 | 28 6f 6e 20 5c 55 4e 49 |is used |(on \UNI|
|000004a0| 58 7b 7d 29 2c 20 6f 72 | 20 74 68 65 20 63 75 72 |X{}), or| the cur|
|000004b0| 72 65 6e 74 0a 77 6f 72 | 6b 69 6e 67 20 64 69 72 |rent.wor|king dir|
|000004c0| 65 63 74 6f 72 79 20 28 | 61 6c 6c 20 6f 74 68 65 |ectory (|all othe|
|000004d0| 72 20 73 79 73 74 65 6d | 73 29 2e 20 20 4e 6f 20 |r system|s). No |
|000004e0| 63 68 65 63 6b 20 69 73 | 20 6d 61 64 65 20 74 6f |check is| made to|
|000004f0| 20 73 65 65 0a 77 68 65 | 74 68 65 72 20 69 74 73 | see.whe|ther its|
|00000500| 20 76 61 6c 75 65 20 69 | 73 20 76 61 6c 69 64 2e | value i|s valid.|
|00000510| 0a 5c 65 6e 64 7b 64 61 | 74 61 64 65 73 63 7d 0a |.\end{da|tadesc}.|
|00000520| 5c 74 74 69 6e 64 65 78 | 7b 54 4d 50 44 49 52 7d |\ttindex|{TMPDIR}|
|00000530| 0a 0a 5c 62 65 67 69 6e | 7b 64 61 74 61 64 65 73 |..\begin|{datades|
|00000540| 63 7d 7b 74 65 6d 70 6c | 61 74 65 7d 0a 57 68 65 |c}{templ|ate}.Whe|
|00000550| 6e 20 73 65 74 20 74 6f | 20 61 20 76 61 6c 75 65 |n set to| a value|
|00000560| 20 6f 74 68 65 72 20 74 | 68 61 6e 20 5c 63 6f 64 | other t|han \cod|
|00000570| 65 7b 4e 6f 6e 65 7d 2c | 20 74 68 69 73 20 76 61 |e{None},| this va|
|00000580| 72 69 61 62 6c 65 20 64 | 65 66 69 6e 65 73 20 74 |riable d|efines t|
|00000590| 68 65 0a 70 72 65 66 69 | 78 20 6f 66 20 74 68 65 |he.prefi|x of the|
|000005a0| 20 66 69 6e 61 6c 20 63 | 6f 6d 70 6f 6e 65 6e 74 | final c|omponent|
|000005b0| 20 6f 66 20 74 68 65 20 | 66 69 6c 65 6e 61 6d 65 | of the |filename|
|000005c0| 73 20 72 65 74 75 72 6e | 65 64 20 62 79 0a 5c 63 |s return|ed by.\c|
|000005d0| 6f 64 65 7b 6d 6b 74 65 | 6d 70 28 29 7d 2e 20 20 |ode{mkte|mp()}. |
|000005e0| 41 20 73 74 72 69 6e 67 | 20 6f 66 20 64 65 63 69 |A string| of deci|
|000005f0| 6d 61 6c 20 64 69 67 69 | 74 73 20 69 73 20 61 64 |mal digi|ts is ad|
|00000600| 64 65 64 20 74 6f 20 67 | 65 6e 65 72 61 74 65 0a |ded to g|enerate.|
|00000610| 75 6e 69 71 75 65 20 66 | 69 6c 65 6e 61 6d 65 73 |unique f|ilenames|
|00000620| 2e 20 20 54 68 65 20 64 | 65 66 61 75 6c 74 20 69 |. The d|efault i|
|00000630| 73 20 65 69 74 68 65 72 | 20 60 60 5c 63 6f 64 65 |s either| ``\code|
|00000640| 7b 40 5c 76 61 72 7b 70 | 69 64 7d 2e 7d 27 27 20 |{@\var{p|id}.}'' |
|00000650| 77 68 65 72 65 0a 5c 76 | 61 72 7b 70 69 64 7d 20 |where.\v|ar{pid} |
|00000660| 69 73 20 74 68 65 20 63 | 75 72 72 65 6e 74 20 70 |is the c|urrent p|
|00000670| 72 6f 63 65 73 73 20 49 | 44 20 28 6f 6e 20 5c 55 |rocess I|D (on \U|
|00000680| 4e 49 58 7b 7d 29 2c 20 | 6f 72 20 60 60 5c 63 6f |NIX{}), |or ``\co|
|00000690| 64 65 7b 74 6d 70 7d 27 | 27 20 28 61 6c 6c 0a 6f |de{tmp}'|' (all.o|
|000006a0| 74 68 65 72 20 73 79 73 | 74 65 6d 73 29 2e 0a 5c |ther sys|tems)..\|
|000006b0| 65 6e 64 7b 64 61 74 61 | 64 65 73 63 7d 0a 0a 57 |end{data|desc}..W|
|000006c0| 61 72 6e 69 6e 67 3a 20 | 69 66 20 61 20 5c 55 4e |arning: |if a \UN|
|000006d0| 49 58 7b 7d 20 70 72 6f | 63 65 73 73 20 75 73 65 |IX{} pro|cess use|
|000006e0| 73 20 5c 63 6f 64 65 7b | 6d 6b 74 65 6d 70 28 29 |s \code{|mktemp()|
|000006f0| 7d 2c 20 74 68 65 6e 20 | 63 61 6c 6c 73 0a 5c 63 |}, then |calls.\c|
|00000700| 6f 64 65 7b 66 6f 72 6b | 28 29 7d 20 61 6e 64 20 |ode{fork|()} and |
|00000710| 62 6f 74 68 20 70 61 72 | 65 6e 74 20 61 6e 64 20 |both par|ent and |
|00000720| 63 68 69 6c 64 20 63 6f | 6e 74 69 6e 75 65 20 74 |child co|ntinue t|
|00000730| 6f 20 75 73 65 0a 5c 63 | 6f 64 65 7b 6d 6b 74 65 |o use.\c|ode{mkte|
|00000740| 6d 70 28 29 7d 2c 20 74 | 68 65 20 70 72 6f 63 65 |mp()}, t|he proce|
|00000750| 73 73 65 73 20 77 69 6c | 6c 20 67 65 6e 65 72 61 |sses wil|l genera|
|00000760| 74 65 20 63 6f 6e 66 6c | 69 63 74 69 6e 67 20 74 |te confl|icting t|
|00000770| 65 6d 70 6f 72 61 72 79 | 0a 6e 61 6d 65 73 2e 20 |emporary|.names. |
|00000780| 20 54 6f 20 72 65 73 6f | 6c 76 65 20 74 68 69 73 | To reso|lve this|
|00000790| 2c 20 74 68 65 20 63 68 | 69 6c 64 20 70 72 6f 63 |, the ch|ild proc|
|000007a0| 65 73 73 20 73 68 6f 75 | 6c 64 20 61 73 73 69 67 |ess shou|ld assig|
|000007b0| 6e 20 5c 63 6f 64 65 7b | 4e 6f 6e 65 7d 0a 74 6f |n \code{|None}.to|
|000007c0| 20 5c 63 6f 64 65 7b 74 | 65 6d 70 6c 61 74 65 7d | \code{t|emplate}|
|000007d0| 2c 20 74 6f 20 66 6f 72 | 63 65 20 72 65 63 6f 6d |, to for|ce recom|
|000007e0| 70 75 74 69 6e 67 20 74 | 68 65 20 64 65 66 61 75 |puting t|he defau|
|000007f0| 6c 74 20 6f 6e 20 74 68 | 65 20 6e 65 78 74 20 63 |lt on th|e next c|
|00000800| 61 6c 6c 0a 74 6f 20 5c | 63 6f 64 65 7b 6d 6b 74 |all.to \|code{mkt|
|00000810| 65 6d 70 28 29 7d 2e 0a | |emp()}..| |
+--------+-------------------------+-------------------------+--------+--------+