comparison scripts/help/__makeinfo__.m @ 9982:7cef030b8069

let __makeinfo__ create temporary file in P_tmpdir
author Jaroslav Hajek <highegg@gmail.com>
date Mon, 14 Dec 2009 15:22:26 +0100
parents 9eb6e8f2b937
children 2d347a2f4a0a
comparison
equal deleted inserted replaced
9981:692ab4eaf965 9982:7cef030b8069
122 ## Create the final TeXinfo input string 122 ## Create the final TeXinfo input string
123 text = sprintf ("\\input texinfo\n\n%s\n\n@bye\n", text); 123 text = sprintf ("\\input texinfo\n\n%s\n\n@bye\n", text);
124 124
125 unwind_protect 125 unwind_protect
126 ## Write Texinfo to tmp file 126 ## Write Texinfo to tmp file
127 [fid, name, msg] = mkstemp ("octave_help_XXXXXX", true); 127 template = "octave_help_XXXXXX";
128 [fid, name, msg] = mkstemp ([P_tmpdir, filesep, template], true);
129 if (fid < 0)
130 error ("__makeinfo__: could not create temporary file");
131 endif
128 fwrite (fid, text); 132 fwrite (fid, text);
129 fclose (fid); 133 fclose (fid);
130 134
131 ## Take action depending on output type 135 ## Take action depending on output type
132 switch (lower (output_type)) 136 switch (lower (output_type))