File: plttest.c

package info (click to toggle)
gcl 2.6.14-21
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 60,864 kB
  • sloc: ansic: 177,407; lisp: 151,509; asm: 128,169; sh: 22,510; cpp: 11,923; tcl: 3,181; perl: 2,930; makefile: 2,360; sed: 334; yacc: 226; lex: 95; awk: 30; fortran: 24; csh: 23
file content (86 lines) | stat: -rw-r--r-- 1,308 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#include <unistd.h>
#include <string.h>
#include <setjmp.h>
#include <stdio.h>
#include <math.h>

/*  We try here to compile in function addresses to which it is known
    that the compiler will make *direct* reference.  20040308 CM */

#if defined (__APPLE__) && defined (__MACH__)
#define DARWIN
#endif

#ifndef DARWIN
extern int _mcount();
#define mmcount _mcount
extern void sincos(double,double *,double *);
#endif

int
main(int argc,char * argv[],char *envp[]) {

  FILE *f=NULL;
  char ch=0;
  jmp_buf env;
  double d=0.1;
  long l;
  unsigned long ul;

  sscanf(argv[1],"%lf",&d);
  bzero(&env,sizeof(env));
  memset(&env,0,sizeof(env));
  
  ul=*(unsigned long *)envp;
  ul=ul%(ul>>(ul & 0x3));
  l=*(long *)argv;
  l=l%(l<<(l & 0x7));
  l/=ul/l;
  l/=((long)ul)/l;

  ch=getc(f);
  ch&=putc(ch,f);
  ch&=feof(f);

  f=fdopen(l,"r");
  l=read(l,&l,sizeof(l));
  l=write(l,&l,sizeof(l));

#ifndef DARWIN
  ch&=mmcount();
#endif

  setjmp(env);

  d=cos(d);
  d=sin(d);
#ifndef DARWIN
  sincos(d,&d,&d);
#endif
  d=tan(d);

  d=acos(d);
  d=asin(d);
  d=atan(d);

  d=cosh(d);
  d=sinh(d);
  d=tanh(d);

#ifndef _WIN32
  d=acosh(d);
  d=asinh(d);
  d=atanh(d);
#endif

  d=exp(d);
  d=log(d);
#ifdef __i386__/*FIXME*/
  d=logl(d);
#endif

  d=sqrt(d);
  
  return ul & l & ((unsigned long)d) & ch;

}