~ubuntu-branches/ubuntu/raring/texlive-bin/raring

« back to all changes in this revision

Viewing changes to utils/pmx/pmx-2.6.18/libf2c/system_.c

  • Committer: Package Import Robot
  • Author(s): Norbert Preining
  • Date: 2012-05-30 11:02:05 UTC
  • mfrom: (4.1.20 sid)
  • Revision ID: package-import@ubuntu.com-20120530110205-9gb0n01ahjs4g15y
Tags: 2012.20120530-1
* new upstream snapshot (svn 26726)
  exporting kpse_cnf_get (Closes: #675109)
* cnf.h is again installed, don't install it via libkpathsea-dev.install
* patch handling:
  . removed: 41_maketexmf, 12_fix_epstopdf_invocation
    both included upstream or not needed anymore
  . new: set-e-fmtutil part of set-e-in-various-scripts that still 
    applies
  . disabled: 57_texconfig_papersizes_for_upstream,
    58_texconfig_papersizes_use_ucf, superseeded by 55_texconfig_stuff
  . disabled: set-e-in-various-scripts: split into set-e-fmtutil
    and a disabled part for texconfig

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* f77 interface to system routine */
 
2
 
 
3
#include "f2c.h"
 
4
 
 
5
#ifdef KR_headers
 
6
extern char *F77_aloc();
 
7
 
 
8
 integer
 
9
system_(s, n) register char *s; ftnlen n;
 
10
#else
 
11
#undef abs
 
12
#undef min
 
13
#undef max
 
14
#include "stdlib.h"
 
15
#ifdef __cplusplus
 
16
extern "C" {
 
17
#endif
 
18
extern char *F77_aloc(ftnlen, char*);
 
19
 
 
20
 integer
 
21
system_(register char *s, ftnlen n)
 
22
#endif
 
23
{
 
24
        char buff0[256], *buff;
 
25
        register char *bp, *blast;
 
26
        integer rv;
 
27
 
 
28
        buff = bp = n < sizeof(buff0)
 
29
                        ? buff0 : F77_aloc(n+1, "system_");
 
30
        blast = bp + n;
 
31
 
 
32
        while(bp < blast && *s)
 
33
                *bp++ = *s++;
 
34
        *bp = 0;
 
35
        rv = system(buff);
 
36
        if (buff != buff0)
 
37
                free(buff);
 
38
        return rv;
 
39
        }
 
40
#ifdef __cplusplus
 
41
}
 
42
#endif