#include <stdio.h>
+#include <string.h>
struct Arr2Object {
int a[10];
int main(int argc, char *argv[]) {
int i, j, bi;
struct ArrObject ao[10];
- struct ArrObject aob;
struct Arr2Object a2o[2];
struct Arr2Object a2;
* $Id$
*/
-//#include <stdio.h>
+#include <stdio.h>
struct s {
int a;
#define true 1
#define false 0
-static void piff(void) {
- int i, j, x, delta_x;
-
- delta_x = 2;
- j = 0;
- x = 0;
- for (i = 0, x = 0; i < 1000; i++, x += delta_x) {
- j += x;
- }
-}
-
static int simpleloop (int a, int b) {
- int i, j, delta_x, x;
+ int i, j;
boolean loopfinal = true;
for(i = 0; (i < 10) && loopfinal; i++) {
}
int main (int argc, char *argv[]) {
- int i, j;
-
printf("ForTest.c\n");
simpleloop(3, 10);
// $Id$
//
// Testprogram to test GCC-firm : GlobalCseTest.c
+#include <stdio.h>
int m(int a) {
int b;
* Heap-Methoden und gibt das sortierte Feld zurück.
*/
int *heapsort(int *b, int len) {
- int i, k;
+ int k;
int *c;
int *a;
+#include <stdio.h>
+
//
// GCC-firm Project
//
printf("Pdg.c\n");
i = 1;
+ k = 0;
while (i < 10) {
j = i + 1;
if (j == 7)
i = i + 1;
}
+ (void) k;
return 0;
}
int j = 0;
boolean res;
+ printf("POK: %d\n", i);
+
while (j < i) {
if ((row[j] == row[i]) || ((myabs(row[i]-row[j])) == (i-j))) {
+ printf("F\n");
res = false;
return(res);
}
j = j+1;
}
+ printf("T\n");
res = true;
return(res);
}
int solve (int n) {
- // return the number of solutions to the n-queens problem
- int c = 0;
- int res = 0;
-
- row = (void *)malloc(sizeof(*row) * n);
- row[0] = -1;
- while (c >= 0) {
- row[c] = row[c]+1;
- while ((row[c] < n) && (!place_ok(c))) {
- row[c] = row[c]+1;
- }
- if (row[c] < n) { // successfully placed at (c,row[c])
- if (c == n-1)
- res = res+1;
- else {
- c = c+1;
- row[c] = -1;
- }
- }
- else // dead end, track back
- c = c-1;
- }
- free(row);
-
- return(res);
+ // return the number of solutions to the n-queens problem
+ int c = 0;
+ int res = 0;
+
+ row = (void *)malloc(sizeof(*row) * n);
+ row[0] = -1;
+ while (c >= 0) {
+ row[c] = row[c]+1;
+ while ((row[c] < n) && (!place_ok(c))) {
+ row[c] = row[c]+1;
+ }
+ printf("RC: %d\n", row[c]);
+ if (row[c] < n) { // successfully placed at (c,row[c])
+ if (c == n-1)
+ res = res+1;
+ else {
+ c = c+1;
+ row[c] = -1;
+ }
+ }
+ else // dead end, track back
+ c = c-1;
+ }
+ free(row);
+
+ return(res);
}
static void usage (const char *progname) {
static void runSieve(void) {
int ITERATIONS = 100000;
boolean *flags;
- int i, prime, k, iter, p;
+ int i, prime, k;
int iterations = 0;
int count;
}
int main(int argc, char *argv[]) {
- int i;
-
printf("Sieve.c\n");
if (argc <= 1) {
printf(" %d\n", i);
}
-static int id(int i) {
- return(i);
-}
-
// standard switch with 1 case
static void switch1(int i) {
switch(i) {
int main (int argc, char *argv[]) {
printf("Switcher.c\n");
- printf(" must print:\n 0\n 2\n 0\n 3\n -1\n 2\n is 16\n multiple of 4\n\n");
+ printf(" must print:\n 0\n 2\n 0\n 3\n -1\n 2\n 5\n is 16\n multiple of 4\n\n");
switch1(0);
switch2(2);
switch3(0);
switch4(5);
switch5(0);
switch6(2);
+ switch7(3);
double_switch(16);
return 0;
itoa(t,cht);
write(1,cht,strlen(cht));
write(1,pp6,strlen(pp6));
+ abort();
}
+#include <stdio.h>
+
int arr0[] = { 0, 1, 2, 3 };
int arr1[4] = { 3, 2, 1 };
int arrm[3][4] = { {1}, {2,3,4,5}, {6, 7, 8 } };
+#include <stdio.h>
+
int foo[255][4];
int bar[4] = { 0, 1, 2, 3 };
+#include <stdio.h>
+
struct a {
unsigned int i:1;
};
#include <stdio.h>
#include <ctype.h>
+#include <stdlib.h>
#ifdef VMS
#include <types.h>
#include <stat.h>
spec_select_action(char* from_buf, int from_count, int action, char* to_buf)
{
- char *cp, *rindex(), *malloc();
- struct stat statbuf;
+ char *rindex();
#ifdef SYSV
void onintr(), oops();
#else
short is = s + i;
short fs = s + f;
short ds = s + d;
- int ti = i + s;
+ //int ti = i + s;
int fi = i + f;
int di = i + d;
float df = d + f;
+#include <stdio.h>
+
typedef struct TypeToken
{
int Handle;
+#include <stdio.h>
+
void a(void);
void b(void);
+#include <stdio.h>
+
int main(void) {
long long a = 0x0123456789012345;
+#include <stdio.h>
+
unsigned int c = 0xffffffff;
unsigned short b;
int main(int argc, char** argv)
{
- int a = 49, b = 35, i, g;
+ int a = 49, b = 35, i, g = 0;
if(argc > 2) {
a = atoi(argv[1]);
long int total; /* normalization */
int i,j; /* array indexers */
char c1,c2; /* character holders for level-three search */
- int writecount ; /* Number of characters written */
int bufindex;
/*
int main(int argc, char *argv[])
{
-int count, i, oper;
-int comp_count, new_count;
+int count, i;
+int new_count;
char start_char;
-int N;
-char C;
+int comp_count = 0;
printf("SPEC 129.compress harness\n");
- // for now...
- return 0;
- scanf("%i %c %li", &count, &start_char, &seedi);
+ //scanf("%i %c %li", &count, &start_char, &seedi);
+ count = 10;
+ start_char=10;
+ seedi = 12345;
printf("Initial File Size:%i Start character:%c\n", count, start_char, seedi);
fill_text_buffer(count, start_char, orig_text_buffer);
for (i = 1; i <= 25; i++)
{
new_count=add_line(orig_text_buffer, count, i, start_char);
count=new_count;
- oper=COMPRESS;
+ //oper=COMPRESS;
printf("The starting size is: %d\n", count);
//comp_count=spec_select_action(orig_text_buffer, count, oper, comp_text_buffer);
printf("The compressed size is: %d\n", comp_count);
- oper=UNCOMPRESS;
+ //oper=UNCOMPRESS;
//new_count=spec_select_action(comp_text_buffer, comp_count, oper, new_text_buffer);
printf("The compressed/uncompressed size is: %d\n", new_count);
- compare_buffer(orig_text_buffer, count, new_text_buffer, new_count);
+ //compare_buffer(orig_text_buffer, count, new_text_buffer, new_count);
}
/* Remove comments for Debugging */
/*
+#include <stdio.h>
+
float kahanSum(const float A[], int n) {
float sum = 0.0, C = 0.0, Y, T;
int i;
+#include <stdio.h>
+
+int k = 0;
+
static void
send_via_write()
{
- int r2, fd;
+ int r2 = k, fd;
if ( r2 <= 2147483647 )
{
}
+#include <stdio.h>
+
+int k = 0;
+
static void
send_via_write() {
- int r2;
+ int r2 = k;
if ( r2 <= 2147483647 )
{
}
+#include <stdio.h>
+
#define MAX_OPERANDS 3
typedef unsigned short uint16_t;
+#include <string.h>
+
#ifndef TESTANZ
#define TESTANZ 21
#define IMM 23
#define test16_1 42
#define test16_2 11
#define test16_shift 7
-#define test32_1 0x001200AB
-#define test32_2 0x00341501
+#define test32_1 (T) 0x001200AB
+#define test32_2 (T) 0x00341501
#define test32_shift 5
#define test32_s 7
#endif
+#include <stdio.h>
+
#define maxint(a,b) \
({int _a = (a), _b = (b); _a > _b ? _a : _b; })
+#include <stdio.h>
+
int main()
{
int i;
-//#include <stdio.h>
+#include <stdio.h>
struct A {
int x;
+#include <stdio.h>
+
int test(int a)
{
int b = 0xff;
+#include <stdio.h>
+
/*
* Proj's of the arguments
* Simple DF node.
+#include <stdio.h>
/*
* Proj out of DF node
+#include <stdio.h>
/*
* Control flow divertion in an if statement.
+#include <stdio.h>
/*
* A simple loop
+#include <stdio.h>
+
/*
* Proj's of the arguments
* Simple DF node.
+#include <stdio.h>
+
#ifdef __GNUC__
#define va_start(v,l) __builtin_va_start(v,l)
#define va_end(v) __builtin_va_end(v)
+#include <stdio.h>
+
int T6, T10, T13;
/*