repo_name stringlengths 5 122 | path stringlengths 3 232 | text stringlengths 6 1.05M |
|---|---|---|
horvatic/arm64-examples | c-print/core/io.h | <filename>c-print/core/io.h
extern void print_word(char * str, unsigned long int buffsize);
extern long read_word(char * buffer, unsigned long int buffsize);
|
horvatic/arm64-examples | c-print/core/main.c | #include "io.h"
#include "hello.h"
void printHelloWorldUsingArm64() {
print_hello();
}
void printAnyStringArm64() {
char s[] = "Printed using ARM64\n";
print_word(&s[0], sizeof(s));
}
void readInputPrintInput() {
int bufferSize = 100;
char buffer[bufferSize];
long inputSize = 0;
inputSize = read_word(&buffer... |
horvatic/arm64-examples | c-print/core/hello.h | <gh_stars>1-10
extern void print_hello(void);
|
qsctr/robocup-2016-tas | libraries/SuperMessages/SuperMessages.h | <gh_stars>0
#ifndef SUPER_MESSAGES_H
#define SUPER_MESSAGES_H
static const char relay_complete = 'x';
#endif |
qsctr/robocup-2016-tas | libraries/Dress/Dress.h | #ifndef DRESS_H
#define DRESS_H
#include <Arduino.h>
#include <Adafruit_NeoPixel.h>
#include <avr/power.h>
struct Dress
{
Dress(int pin);
Adafruit_NeoPixel lights;
void blue();
void blue_sync();
void rainbow();
void rainbow_sync();
private:
uint32_t Wheel(byte WheelPos);
};
#endi... |
qsctr/robocup-2016-tas | libraries/AsyncServo/AsyncServo.h | <gh_stars>0
#ifndef ASYNC_SERVO_H
#define ASYNC_SERVO_H
#include <Arduino.h>
#include <Servo.h>
struct AsyncServo
{
AsyncServo(int pin, int stay_power);
void move_start(int power);
void move(int ms);
void move_cond(bool cond);
Servo motor;
unsigned long time;
bool prev;
int stay_power;... |
qsctr/robocup-2016-tas | libraries/Wheels/Wheels.h | #ifndef WHEELS_H
#define WHEELS_H
#include <Arduino.h>
#include <Servo.h>
struct Wheels
{
static void init(int l_enc_pin_a, int l_enc_pin_b, int l_mot_pin, int r_enc_pin_a, int r_enc_pin_b, int r_mot_pin);
static void delay_encoder(int x);
static void write(int power);
static void write(int l_power, i... |
qsctr/robocup-2016-tas | libraries/Ping/Ping.h | #ifndef PING_H
#define PING_H
#include <Arduino.h>
struct Ping
{
Ping(int pin);
bool over(long x);
long cm();
int pin;
};
#endif |
qsctr/robocup-2016-tas | libraries/Messages/Messages.h | #ifndef MESSAGES_H
#define MESSAGES_H
#include <Arduino.h>
namespace Messages
{
const char
start = 'a',
door_change = 'b',
paint_flowers = 'c',
put_cup = 'd';
void wait_for(char message);
};
#endif |
qsctr/robocup-2016-tas | libraries/CompassSensor/CompassSensor.h | <gh_stars>0
#ifndef COMPASS_SENSOR_H
#define COMPASS_SENSOR_H
#include <Arduino.h>
#include <Wire.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_HMC5883_U.h>
struct Compass
{
Compass(int id);
void record();
bool near(float deg);
float angle();
Adafruit_HMC5883_Unified sensor;
float start_a... |
qsctr/robocup-2016-tas | libraries/Pneumatic/Pneumatic.h | #ifndef PNEUMATIC_H
#define PNEUMATIC_H
#include <Arduino.h>
struct Pneumatic
{
Pneumatic(int pin);
void up_and_down_start();
void up_and_down();
void up();
void down();
unsigned long time;
int pin;
};
#endif |
clean-code-craft-tcq-1/ms1snippet-c-sembooooo | sensor-validate.c | /***
*
* Refer readme.md file for understanding the reasons behind my naming
*/
#include "sensor-validate.h"
#include <assert.h>
#define TRUE 1
#define FALSE 0
int IsDifferenceMoreThanMaxDelta(double value, double nextValue, double maxDelta) {
if(nextValue - value > maxDelta) {
return TRUE;
}
ret... |
clean-code-craft-tcq-1/ms1snippet-c-sembooooo | sensor-validate.h |
int IsDifferenceMoreThanMaxDelta(double value, double nextValue, double maxDelta);
int IsChangeinValuesAbrupt (double* values, int numOfValues, double maxDelta);
int IsSOCReadingsValid(double* values, int numOfValues);
int IsCurrentReadingsValid(double* values, int numOfValues);
|
lelordoftech/terminal_tetris | src/define.h | <reponame>lelordoftech/terminal_tetris
//
// define.h
//
//
// Created by <NAME> on 2019/05/08.
//
#ifndef define_h
#define define_h
#include <stdint.h>
#define GAME_WIDTH 20
#define GAME_HEIGHT 20
#define LABEL_WIDTH 9
#define INFO_WIDTH 9
#define PANEL_HEIGHT 9
#define BLACK_PAIR 0
#define RED_PAIR 1
#define ... |
lelordoftech/terminal_tetris | src/game.h | <reponame>lelordoftech/terminal_tetris
//
// game.h
//
//
// Created by <NAME> on 2019/05/06.
//
#ifndef game_h
#define game_h
int init();
void run();
void close();
#endif /* game_h */
|
lelordoftech/terminal_tetris | src/object.h | <reponame>lelordoftech/terminal_tetris
//
// object.h
//
//
// Created by <NAME> on 2019/05/08.
//
#ifndef object_h
#define object_h
#include "define.h"
struct table_cell {
uint_fast8_t color;
bool has_data;
table_cell() : color(BLACK_PAIR), has_data(false) {};
void update(uint_fast8_t _color, bool _has_... |
edadma/m68k | tests/armstrong.c | <gh_stars>0
extern void outc( char c );
void
print( char* s ) {
while (*s)
outc( *s++ );
outc( '\n' );
}
char*
bin2str( int n, int radix, char* buf ) {
char digits[] = "0123456789ABCDEF";
char* p = &buf[33];
int quo = n;
if (n < 0)
quo = -quo;
*p-- = 0;
while (quo >= radix) {
*p-- = digits[(quo%rad... |
edadma/m68k | tests/printf.c | <filename>tests/printf.c
#include <stdio.h>
#include <stdlib.h>
int
main() {
printf( "|%5s| |%5d| |%5x| |%5.1f| %e\n", "asdf", 123, 123, 3.4, atof("3.4") );
return 0;
}
|
edadma/m68k | tests/bittwiddling16.c | <reponame>edadma/m68k<filename>tests/bittwiddling16.c
extern void outc( char c );
void
print( char* s ) {
while (*s)
outc( *s++ );
}
void
println() {
outc( '\n' );
}
char*
bin2str( short n, int radix, char* buf ) {
char digits[] = "0123456789ABCDEF";
char* p = &buf[33];
short quo = n;
if (n < 0)
quo = -q... |
edadma/m68k | tests/pi_approx.c | #include "../tools/services.h"
void
print( char* s ) {
while (*s)
outc( *s++ );
}
void
println( char* s ) {
print( s );
outc( '\n' );
}
char*
double2str( double x )
{
static char p[35];
int i = 0;
int k = 0;
if (x < 0) {
x = -x;
p[0] = '-';
i++;
k++;
}
while (((int) x) > 0) {
x /= 10;
i++;
... |
edadma/m68k | tests/str2int.c | <reponame>edadma/m68k
extern void halt();
extern void outc( char c );
void
print( char* s ) {
while (*s)
outc( *s++ );
outc( '\n' );
}
int
indexOf( char c, char* s ) {
char* p = s;
char ch;
for (int i = 0; ch = *p++; i++)
if (ch == c)
return i;
return -1;
}
int
str2int( char* n, int radix ) {
char ... |
edadma/m68k | src/main/resources/xyz/hyperreal/m68k/setup/services.h | #include <stdint.h>
extern void outln();
extern void outc( char c );
extern void outf( double a );
extern void outs( char* s );
extern void outsln( char* s );
extern void outn( int n );
extern void outnln( int n );
extern void outl( int64_t n );
extern void halt() __attribute__ ((noreturn));
extern int64_t currentTime... |
edadma/m68k | tests/int2stru.c | extern void outc( char c );
void
print( char* s ) {
while (*s)
outc( *s++ );
outc( '\n' );
}
int
signum( int n ) {
return n == 0 ? 0 : n < 0 ? -1 : 1;
}
void
prints( int n ) {
static char* signs[] = {
"negative",
"zero",
"positive"
};
print( signs[signum(n) + 1] );
}
char*
int2stru( unsigned int n,... |
edadma/m68k | tests/quicksort16.c | #include "../tools/services.h"
void
print( char* s ) {
while (*s)
outc( *s++ );
}
void
println( char* s ) {
print( s );
outc( '\n' );
}
char*
bin2str( short n, int radix, char* buf ) {
char digits[] = "0123456789ABCDEF";
char* p = &buf[33];
short quo = n;
if (n < 0)
quo = -quo;
*p-- = 0;
while (quo ... |
edadma/m68k | tests/int2str64.c | <gh_stars>0
#include "../tools/services.h"
void
print( char* s ) {
while (*s)
outc( *s++ );
}
void
println( char* s ) {
print( s );
outc( '\n' );
}
char*
int2str64( int64_t n, int radix, char* buf ) {
char digits[] = "0123456789ABCDEF";
char* p = &buf[33];
int64_t quo = n;
if (n < 0)
quo = -quo;
*p-- ... |
edadma/m68k | src/main/resources/xyz/hyperreal/m68k/setup/syscalls.c | #include "services.h"
#include <stdlib.h>
#include <time.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <errno.h>
#undef errno
extern int errno;
int
close(int file) {
return -1;
}
int
fstat(int file, struct stat *st) {
st->st_mode = S_IFCHR;
return 0;
}
int
isatty(int file) {
return 1;
}
i... |
edadma/m68k | tests/hello.c | <reponame>edadma/m68k
extern void outc( char c );
void
main() {
for (char* p = "Hello world!\n"; *p;)
outc( *p++ );
} |
edadma/m68k | tests/strcmp.c | extern void outc( char c );
extern void outn( int n );
void
print( char* s ) {
while (*s)
outc( *s++ );
outc( '\n' );
}
int
signum( int n ) {
return n == 0 ? 0 : n < 0 ? -1 : 1;
}
void
prints( int n ) {
static char* signs[] = {
"negative",
"zero",
"positive"
};
print( signs[signum(n) + 1]... |
edadma/m68k | src/main/resources/xyz/hyperreal/m68k/setup/main.c | <reponame>edadma/m68k<filename>src/main/resources/xyz/hyperreal/m68k/setup/main.c<gh_stars>0
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <time.h>
#include <errno.h>
#include "services.h"
double theta = 1.2;
void
main() {
printf( "sin(%g)^2 + cos(%g)^2 = %g\n", theta, the... |
snporta/loopback-sdk-ios | LoopBack/LBPersistedModel.h | <gh_stars>10-100
/**
* @file LBPersistedModel.h
*
* @author <NAME>
* @copyright (c) 2013 StrongLoop. All rights reserved.
*/
#import "LBModel.h"
// The following typedefs are not used anymore but left for backward compatibility.
@class LBPersistedModel;
typedef void (^LBPersistedModelObjectSuccessBlock)(LBPersi... |
snporta/loopback-sdk-ios | SLRemoting/SLObject.h | <filename>SLRemoting/SLObject.h
/**
* @file SLObject.h
*
* @author <NAME>
* @copyright (c) 2013 StrongLoop. All rights reserved.
*/
#import <Foundation/Foundation.h>
#import <CoreLocation/CoreLocation.h> // for CLLocation
#import "SLAdapter.h"
/**
* An error description for SLObjects with an invalid repositor... |
snporta/loopback-sdk-ios | LoopBack/LBModel.h | /**
* @file LBModel.h
*
* @author <NAME>
* @copyright (c) 2013 StrongLoop. All rights reserved.
*/
#import "SLRemoting.h"
/**
* A local representative of a single model instance on the server. The data is
* immediately accessible locally.
*/
@interface LBModel : SLObject
/**
* Returns the value associated... |
snporta/loopback-sdk-ios | SLRemoting/SLStreamParam.h | <filename>SLRemoting/SLStreamParam.h
/**
* @file SLStreamParam.h
*
* @copyright (c) 2015 StrongLoop. All rights reserved.
*/
#import <Foundation/Foundation.h>
/**
* A request parameter that is a (binary) stream.
*/
@interface SLStreamParam : NSObject
@property (readonly, nonatomic, strong) NSInputStream *input... |
snporta/loopback-sdk-ios | LoopBack/LBRESTAdapter.h | <filename>LoopBack/LBRESTAdapter.h
/**
* @file LBRESTAdapter.h
*
* @author <NAME>
* @copyright (c) 2013 StrongLoop. All rights reserved.
*/
#import "SLRemoting.h"
#import "LBModel.h"
#import "LBPersistedModel.h"
/**
* An extension to the vanilla SLRESTAdapter to make working with LBModels
* easier.
*/
@inter... |
snporta/loopback-sdk-ios | LoopBack/LoopBack.h | /**
* @file LoopBack.h
*
* @author <NAME>
* @copyright (c) 2013 StrongLoop. All rights reserved.
*/
#import "LBModel.h"
#import "LBPersistedModel.h"
#import "LBRESTAdapter.h"
#import "LBInstallation.h"
#if TARGET_OS_IPHONE
#import "LBPushNotification.h"
#endif
#import "LBUser.h"
#import "LBFile.h"
#import "LBCont... |
snporta/loopback-sdk-ios | SLRemoting/SLRemotingTestsUtils.h | /**
* @file SLRemotingTestsUtils.h
*
* @author <NAME>
* @copyright (c) 2013 StrongLoop. All rights reserved.
*/
#import <Foundation/Foundation.h>
/**
* Marks the start of an asynchronous unit test.
*/
// NOTE: since the CI uses Xcode 5, we cannot depend on XCTestExpectation.
// Use dispatch_semaphore instead.
... |
snporta/loopback-sdk-ios | LoopBackOSX/LoopBackOSX.h | //
// LoopBackOSX.h
// LoopBackOSX
//
// Created by <NAME> on 4/9/15.
// Copyright (c) 2015 StrongLoop. All rights reserved.
//
#import "LBModel.h"
#import "LBPersistedModel.h"
#import "LBRESTAdapter.h"
#import "LBInstallation.h"
#import "LBUser.h"
#import "LBFile.h"
#import "LBContainer.h"
//! Project version nu... |
snporta/loopback-sdk-ios | LoopBack/LBFile.h | /**
* @file LBFile.h
*
* @author <NAME>
* @copyright (c) 2014 StrongLoop. All rights reserved.
*/
#import "LBModel.h"
/**
* A local representative of a file instance on the server.
*/
@interface LBFile : LBModel
@property (nonatomic, copy) NSString *name;
@property (nonatomic, copy) NSString *localPath;
@prop... |
snporta/loopback-sdk-ios | LoopBack/LBInstallation.h | /**
* @file LBInstallation.h
*
* @author <NAME>
* @copyright (c) 2013 StrongLoop. All rights reserved.
*/
#import "LBPersistedModel.h"
#import "LBRESTAdapter.h"
@class LBInstallation;
@class LBInstallationRepository;
/**
* LBInstallation represents the installation of a given app on the device. It
* connects... |
snporta/loopback-sdk-ios | SLRemoting/SLAdapter.h | /**
* @file SLAdapter.h
*
* @author <NAME>
* @copyright (c) 2013 StrongLoop. All rights reserved.
*/
#import <Foundation/Foundation.h>
/**
* Blocks of this type are executed for any successful method invocation, i.e.
* one where the remote method called the callback as `callback(null, value)`.
*
* **Example:... |
frank-lesser/gambit | lib/guide/guideuitextedit.h | /* File: "guideuitextedit.h", Time-stamp: <2005-04-12 13:28:10 feeley> */
/* Copyright (C) 1994-2005 by <NAME>, All Rights Reserved. */
#ifndef ___GUIDEUITEXTEDIT_H
#define ___GUIDEUITEXTEDIT_H
/*---------------------------------------------------------------------------*/
#include <qtextedit.h>
#include <qstatusba... |
frank-lesser/gambit | bench/src/array1.c | <filename>bench/src/array1.c<gh_stars>100-1000
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[]) {
int i, j, k, n;
int *ip, *jp;
if (argc == 1)
n = 200000;
else
n = atoi(argv[1]);
for (k=0; k<100; k++)
{
... |
frank-lesser/gambit | prebuilt/windows/binpatch.c | <filename>prebuilt/windows/binpatch.c
/* File: "binpatch.c" */
/* Copyright (c) 2007-2016 by <NAME>, All Rights Reserved. */
/* This is a tool for patching binary files */
/*---------------------------------------------------------------------------*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
void... |
frank-lesser/gambit | lib/guide/guideuiinspector.h | /* File: "guideuiinspector.h", Time-stamp: <2005-04-28 15:00:34 feeley> */
/* Copyright (C) 1994-2005 by <NAME>, All Rights Reserved. */
#ifndef ___GUIDEUIINSPECTOR_H
#define ___GUIDEUIINSPECTOR_H
/*---------------------------------------------------------------------------*/
#include "guide.h"
#include <qlistview.... |
frank-lesser/gambit | gsc/_back.c | <reponame>frank-lesser/gambit
#ifdef ___LINKER_INFO
; File: "_back.c", produced by Gambit v4.9.3
(
409003
(C)
"_back"
(("_back"))
(
"_back"
"arith"
"closure-env"
"fixnum"
"mostly-arith"
"nb-arg-regs"
"nb-gvm-regs"
"return"
"target"
)
(
)
(
"_back#"
"c#default-jump-info"
"c#default-label-info"
"c#get-link-info"
"c#prim-... |
frank-lesser/gambit | lib/guide/guideuienv.h | <gh_stars>10-100
/* File: "guideuienv.h", Time-stamp: <2005-04-12 12:03:23 feeley> */
/* Copyright (C) 1994-2005 by <NAME>, All Rights Reserved. */
#ifndef ___GUIDEUIENV_H
#define ___GUIDEUIENV_H
/*---------------------------------------------------------------------------*/
#include "guideuiinspector.h"
/*-------... |
frank-lesser/gambit | lib/guide/guideuihighlighter.h | /* File: "guideuihighlighter.h", Time-stamp: <2005-04-12 13:25:34 feeley> */
/* Copyright (C) 1994-2005 by <NAME>, All Rights Reserved. */
#ifndef ___GUIDEUIHIGHLIGHTER_H
#define ___GUIDEUIHIGHLIGHTER_H
/*---------------------------------------------------------------------------*/
#include <qsyntaxhighlighter.h>
#... |
frank-lesser/gambit | contrib/GambitREPL/AppDelegate.h | <reponame>frank-lesser/gambit<filename>contrib/GambitREPL/AppDelegate.h
//
// AppDelegate.h
//
// Created by <NAME> on 11-03-06.
// Copyright 2011 Université de Montréal. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "ViewController.h"
@interface AppDelegate : NSObject <UIApplicationDelegate> {
UIWin... |
frank-lesser/gambit | bench/src/tfib.c | <filename>bench/src/tfib.c
/* file: "tfib.c" */
#define USE_PTHREADS
#ifdef USE_PTHREADS
#include <stdio.h>
#include <pthread.h>
void *tfib (void *n)
{
if ((int)n < 2)
return (void*)1;
else
{
pthread_t x;
void *y;
void *z;
if (pthread_create (&x, NULL, tfib, (void*)((int)n - 2)) ... |
frank-lesser/gambit | examples/pthread/mylib.h | <reponame>frank-lesser/gambit
/* File: "mylib.h", Time-stamp: <2007-04-04 14:30:31 feeley> */
/* Copyright (c) 2005-2007 by <NAME>, All Rights Reserved. */
___SCMOBJ new_counter ___PVOID;
void release_counter ___P((___SCMOBJ counter),());
void increment_counter ___P((___SCMOBJ counter),());
int get_counter ___P((_... |
frank-lesser/gambit | gsc/_gsc_.c | #ifdef ___LINKER_INFO
; File: "_gsc_.c", produced by Gambit v4.9.3
(
409003
(C)
"_gsc_"
(("_kernel" (preload . #t)) ("_system" (preload . #t)) ("_num" (preload . #t)) ("_std" (preload . #t)) ("_eval" (preload . #t)) ("_io" (preload . #t)) ("_nonstd" (preload . #t)) ("_thread" (preload . #t)) ("_repl" (preload . #t)) ("... |
frank-lesser/gambit | bench/src/ack.c | <filename>bench/src/ack.c
#include <stdio.h>
int ack(int m, int n) {
if (m == 0)
return n+1;
else if (n == 0)
return ack(m-1, 1);
else
return ack(m-1, ack(m, n-1));
}
int main(int argc, char **argv)
{
int m = 3, n = 9;
if (argc >... |
frank-lesser/gambit | bench/src/sumloop.c | #include <stdio.h>
int main(int argc, char **argv)
{
int i, sum = 0;
int n = 100000000;
if (argc > 1)
n = atoi(argv[1]);
for (i = 0; i < n; i++)
sum++;
printf("%d\n", sum);
return 0;
}
|
frank-lesser/gambit | tests/server.h | /* File: "server.h", Time-stamp: <2007-04-04 11:40:37 feeley> */
/*
* The only declaration in "server.scm" is the function "eval_string".
*/
extern char *eval_string (char *);
|
frank-lesser/gambit | lib/_kernel.c | #ifdef ___LINKER_INFO
; File: "_kernel.c", produced by Gambit v4.9.3
(
409003
(C)
"_kernel"
(("_kernel"))
(
"##type-0-0bf9b656-b071-404a-a514-0fb9d05cf518"
"##type-0-73c66686-a08f-4c7c-a0f1-5ad7771f242a"
"##type-0-828142df-e9a5-4ed8-a467-2f4833525b3e"
"##type-0-d69cd396-01e0-4dcb-87dc-31acea8e0e5f"
"##type-0-f512c9f6-3... |
frank-lesser/gambit | bench/src/cat.c | #include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[]) {
int c;
FILE *infp;
FILE *outfp;
char *infile = "../../src/bib";
char *outfile = "foo";
if (argc > 1)
infile = argv[1];
if (argc > 2)
outfile = argv[2];
... |
frank-lesser/gambit | lib/guide/guideuicodeformat.h | /* File: "guideuicodeformat.h", Time-stamp: <2005-04-28 00:01:46 feeley> */
/* Copyright (C) 1994-2005 by <NAME>, All Rights Reserved. */
#ifndef ___GUIDEUICODEFORMAT_H
#define ___GUIDEUICODEFORMAT_H
/*---------------------------------------------------------------------------*/
#include <qobject.h>
#include <qstri... |
frank-lesser/gambit | include/stamp.h | /*
* Time stamp of last source code repository commit.
*/
#define ___STAMP_YMD 20180930
#define ___STAMP_HMS 122740
|
frank-lesser/gambit | contrib/GambitREPL/KOProtocol.h | //
// KOProtocol.h
// KOKeyboard
//
// Created by <NAME> on 10/26/13.
// Copyright (c) 2013 <NAME>. All rights reserved.
//
@protocol KOProtocol <NSObject>
- (void)insertText:(NSString *)text;
@end
|
frank-lesser/gambit | contrib/GambitREPL/TView.h | <filename>contrib/GambitREPL/TView.h
//
// TView.h
//
// Created by <NAME>
// Copyright 2014 Université de Montréal. All rights reserved.
//
#import <UIKit/UITextView.h>
#import "KOKeyboardRow.h"
//-----------------------------------------------------------------------------
@interface TView : UITextView
{
@publi... |
frank-lesser/gambit | bench/src/sum1.c | <filename>bench/src/sum1.c
#include <stdio.h>
int main(int argc, char *argv[])
{
double s = 0, d;
FILE *fp;
char *infile = "../../src/rn100";
if (argc > 1)
infile = argv[1];
fp = fopen(infile, "r");
if (fp == NULL) {
fprintf(stderr, "can't... |
frank-lesser/gambit | gsc/_codegen.c | <reponame>frank-lesser/gambit
#ifdef ___LINKER_INFO
; File: "_codegen.c", produced by Gambit v4.9.3
(
409003
(C)
"_codegen"
(("_codegen"))
(
"___lowlevel_exec"
"_codegen"
"codegen-context"
"fixup"
)
(
"test"
)
(
"_codegen#"
"_codegen#codegen-context-arch-set!"
"_codegen#codegen-context-fixup-locs"
"_codegen#codegen-con... |
frank-lesser/gambit | bench/src/fib.c | <filename>bench/src/fib.c
/* FIB -- A classic benchmark, computes fib(35) inefficiently. */
#include <stdio.h>
static int fib (n)
int n;
{
if (n < 2)
return n;
else
return fib (n-1) + fib (n-2);
}
int main (int argc, char *argv[])
{
int i;
int result;
int n = 35;
if (argc > 1)
n = atoi (argv... |
frank-lesser/gambit | lib/guide/guideuitableitem.h | <filename>lib/guide/guideuitableitem.h
/* File: "guideuitableitem.h", Time-stamp: <2005-04-12 13:27:57 feeley> */
/* Copyright (C) 1994-2005 by <NAME>, All Rights Reserved. */
#ifndef ___GUIDEUITABLEITEM_H
#define ___GUIDEUITABLEITEM_H
/*---------------------------------------------------------------------------*/
... |
frank-lesser/gambit | bench/src/string.c | <reponame>frank-lesser/gambit
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(int argc, char *argv[])
{
int j, len, n = 500000;
char *s = NULL, *p;
if (argc > 1)
n = atoi(argv[1]);
for (j = 0; j < 10; j++) {
free(s);
... |
frank-lesser/gambit | bench/src/sumfp.c | <reponame>frank-lesser/gambit<filename>bench/src/sumfp.c
/* SUMFP -- Compute sum of integers from 0 to 10000 using floating point */
#include <stdio.h>
#define FLOAT double
static FLOAT run (FLOAT n)
{
FLOAT i = n, sum = 0.;
while (i >= 0.)
{
sum = sum+i;
i = i-1.;
}
return sum;
}
int ma... |
frank-lesser/gambit | gsc/_utils.c | #ifdef ___LINKER_INFO
; File: "_utils.c", produced by Gambit v4.9.3
(
409003
(C)
"_utils"
(("_utils"))
(
"_utils"
)
(
"test"
)
(
"_utils#"
"c#append-lists"
"c#compiler-abort"
"c#compiler-internal-error"
"c#every?"
"c#gnode-depvars"
"c#gnode-find-depvars"
"c#gnode-var"
"c#gnodes-remove"
"c#keep"
"c#list->str"
"c#list->v... |
frank-lesser/gambit | lib/guide/_guide.h | /* File: "_guide.h", Time-stamp: <2007-09-12 00:15:35 feeley> */
/* Copyright (c) 1994-2007 by <NAME>, All Rights Reserved. */
#ifndef ____GUIDE_H
#define ____GUIDE_H
/*---------------------------------------------------------------------------*/
#define ___VERSION 400001
#include "gambit.h"
#include <qstring.h>
... |
frank-lesser/gambit | bench/src/tak.c | <reponame>frank-lesser/gambit
/* TAK -- A vanilla version of the TAKeuchi function. */
#include <stdio.h>
static int tak (x, y, z)
int x, y, z;
{
if (y >= x)
return z;
else
return tak (tak (x-1, y, z),
tak (y-1, z, x),
tak (z-1, x, y));
}
int main (argc, argv)
int argc;
ch... |
frank-lesser/gambit | doc/x.h | <filename>doc/x.h
int x_initialize (char *display_name);
char *x_display_name (void);
void x_bell (int);
|
frank-lesser/gambit | gsc/_source.c | <gh_stars>1-10
#ifdef ___LINKER_INFO
; File: "_source.c", produced by Gambit v4.9.3
(
409003
(C)
"_source"
(("_source"))
(
"##current-readtable"
"##filepos-line"
"##read-all-as-a-begin-expr-from-port"
"##readenv->locat"
"##readtable-string-convert-case!"
"##type-5"
"##type-9-edd21ef2-ee48-407f-a9a9-c1c361078e55"
"##vec... |
frank-lesser/gambit | lib/guide/guideuirepl.h | /* File: "guideuirepl.h", Time-stamp: <2005-04-12 13:26:55 feeley> */
/* Copyright (C) 1994-2005 by <NAME>, All Rights Reserved. */
#ifndef ___GUIDEUIREPL_H
#define ___GUIDEUIREPL_H
/*---------------------------------------------------------------------------*/
#include <qvaluevector.h>
#include <qpopupmenu.h>
#inc... |
frank-lesser/gambit | contrib/GambitREPL/KOCreateButton.h | //
// KOCreateButton.h
// CreateShadowedRoundRectButtonImage
//
// Created by <NAME> on 10/28/13.
// Copyright (c) 2013 <NAME>. All rights reserved.
//
#import <UIKit/UIKit.h>
#import <Availability.h>
@interface KOCreateButton : NSObject
+ (UIColor *)backgroundColorForType:(UIKeyboardAppearance)type;
- (UIImage... |
frank-lesser/gambit | bench/src/tail.c | <reponame>frank-lesser/gambit<gh_stars>100-1000
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(int argc, char *argv[])
{
int i, j;
char buf[5000];
char **lp = (char **) malloc(100 * sizeof(char *));
int nbuf = 100;
FILE *infp;
FILE *outfp;
ch... |
frank-lesser/gambit | lib/guide/_guide.c | <reponame>frank-lesser/gambit
#ifdef ___LINKER_INFO
; File: "_guide.c", produced by Gambit-C 4.0 beta 13
(
40063
" _guide"
(" _guide")
(
"##type-12-6bf088a7-814f-4139-860a-69a757570569"
"##type-14-e188675f-7d4e-4e1f-8eb0-01a25aae640b"
"##type-17-2babe060-9af6-456f-a26e-40b592f690ec"
"##type-6"
"##type-7-cd5f5bad-f96f-4... |
frank-lesser/gambit | lib/guide/guideuicont.h | /* File: "guideuicont.h", Time-stamp: <2005-04-12 12:04:16 feeley> */
/* Copyright (C) 1994-2005 by <NAME>, All Rights Reserved. */
#ifndef ___GUIDEUICONT_H
#define ___GUIDEUICONT_H
/*---------------------------------------------------------------------------*/
#include "guideuiinspector.h"
/*---------------------... |
frank-lesser/gambit | lib/_system.c | <filename>lib/_system.c
#ifdef ___LINKER_INFO
; File: "_system.c", produced by Gambit v4.9.3
(
409003
(C)
"_system"
(("_system"))
(
"##type-0-0bf9b656-b071-404a-a514-0fb9d05cf518"
"##type-0-cd85663e-b289-472c-b943-a41768e2f8a3"
"##type-11-42fe9aac-e9c6-4227-893e-a0ad76f58932"
"##type-11-6bd864f0-27ec-4639-8044-cf7c0135... |
frank-lesser/gambit | contrib/GambitREPL/ITView.h | <gh_stars>10-100
//
// ITView.h
//
// Created by <NAME>
// Copyright 2014 Université de Montréal. All rights reserved.
//
#import <UIKit/UITextView.h>
//-----------------------------------------------------------------------------
@interface ITView : UITextView
{
}
@end
//---------------------------------------... |
frank-lesser/gambit | lib/guide/guideuihighlighterscheme.h | <reponame>frank-lesser/gambit<gh_stars>10-100
/* File: "guideuihighlighterscheme.h", Time-stamp: <2005-04-12 13:25:49 feeley> */
/* Copyright (C) 1994-2005 by <NAME>, All Rights Reserved. */
#ifndef ___GUIDEUIHIGHLIGHTERSCHEME_H
#define ___GUIDEUIHIGHLIGHTERSCHEME_H
/*------------------------------------------------... |
frank-lesser/gambit | lib/guide/guide.h | <filename>lib/guide/guide.h
/* File: "guide.h", Time-stamp: <2007-09-12 00:15:38 feeley> */
/* Copyright (c) 1994-2007 by <NAME>, All Rights Reserved. */
#ifndef ___GUIDE_H
#define ___GUIDE_H
/*---------------------------------------------------------------------------*/
#define ___VERSION 400001
#include "gambit.h... |
frank-lesser/gambit | gsc/_gsc.c | #ifdef ___LINKER_INFO
; File: "_gsc.c", produced by Gambit v4.9.3
(
409003
(C)
"_gsc"
(("_gsc"))
(
""
"##type-15-fe3e988a-c59d-47ce-8592-93b02ce12af1"
"##type-19-a4ef4750-7ce6-4388-9d5f-48e04bf3ae4b"
"##type-37-a7e0fe95-65e9-4b00-b080-b7e6b12d9c6f"
"##type-40-bebee95d-0da2-401d-a33a-c1afc75b9e43"
"##type-5"
"C"
"_gsc"
... |
frank-lesser/gambit | lib/guide/guideuischeme.h | /****************************************************************************
** Form interface generated from reading ui file 'guideuischeme.ui'
**
** Created: lun avr 19 20:53:44 2004
** by: The User Interface Compiler ($Id: qt/main.cpp 3.3.0b1 edited Nov 24 13:47 $)
**
** WARNING! All changes made in this f... |
frank-lesser/gambit | doc/m1.c | /* File: "m1.c" */
int power_of_2 (int x) { return 1<<x; }
|
frank-lesser/gambit | lib/dead.h | <reponame>frank-lesser/gambit
/*---------------------------------------------------------------------------*/
/* Threading. */
#ifdef USE_POSIX
#define ___THREAD_TYPE pthread_t
#define ___THREAD_RESULT_TYPE void*
#define ___THREAD_CREATE(thr,proc,arg) (pthread_create (&thr, NULL, proc, arg) == 0)
#define ___THREAD_E... |
frank-lesser/gambit | gsi/_gsi_.c | <filename>gsi/_gsi_.c
#ifdef ___LINKER_INFO
; File: "_gsi_.c", produced by Gambit v4.9.3
(
409003
(C)
"_gsi_"
(("_kernel" (preload . #t)) ("_system" (preload . #t)) ("_num" (preload . #t)) ("_std" (preload . #t)) ("_eval" (preload . #t)) ("_io" (preload . #t)) ("_nonstd" (preload . #t)) ("_thread" (preload . #t)) ("_re... |
frank-lesser/gambit | lib/os_shell.h | <filename>lib/os_shell.h
/* File: "os_shell.h" */
/* Copyright (c) 1994-2016 by <NAME>, All Rights Reserved. */
#ifndef ___OS_SHELL_H
#define ___OS_SHELL_H
#include "os.h"
/*---------------------------------------------------------------------------*/
typedef struct ___shell_module_struct
{
int refcount;
... |
frank-lesser/gambit | contrib/xactlog/xactlog.c | <reponame>frank-lesser/gambit
/* File: "xactlog.c" (c) 1997-2016, <NAME> */
/* Tool to examine activity logs on an X11 display */
/*
* To compile:
*
* gcc -I /usr/X11/include -O -o xactlog xactlog.c -L /usr/X11/lib -lX11
*
* To run:
*
* ./xactlog gambit.actlog
*/
#include <stdio.h>
#include <stdlib.h... |
frank-lesser/gambit | bench/src/wc.c | #include <stdio.h>
#define IN 1 /* inside a word */
#define OUT 0 /* outside a word */
/* count lines, words, and characters in input */
int main(int argc, char *argv[]) {
int c, nl, nw, nc, state;
FILE *fp;
char *infile = "../../src/bib";
if (argc > 1)
i... |
frank-lesser/gambit | lib/os_dyn.h | /* File: "os_dyn.h" */
/* Copyright (c) 1994-2018 by <NAME>, All Rights Reserved. */
#ifndef ___OS_DYN_H
#define ___OS_DYN_H
#include "os.h"
/*---------------------------------------------------------------------------*/
#ifdef USE_shl_load
#define ___DL_DESCR shl_t
#endif
#ifdef USE_LoadLibrary
#define ___DL_D... |
frank-lesser/gambit | lib/guide/guideuiconsoleinfo.h | /* File: "guideuiconsoleinfo.h", Time-stamp: <2005-04-12 13:24:35 feeley> */
/* Copyright (C) 1994-2005 by <NAME>, All Rights Reserved. */
#ifndef ___GUIDEUICONSOLEINFO_H
#define ___GUIDEUICONSOLEINFO_H
/*---------------------------------------------------------------------------*/
#include <qvaluevector.h>
/*----... |
frank-lesser/gambit | bench/src/fft.c | /* FFT - Fast Fourier Transform */
#include <stdio.h>
#include <math.h>
#define FLOAT double
#define pi2 6.28318530717959
#define SWAP(a,b) { FLOAT temp = a; a = b; b = temp; }
static void four1 (FLOAT *data, int n)
{
int i, j, m, mmax;
i = 0;
j = 0;
while (i < n)
{
if (i < j)
{
... |
frank-lesser/gambit | lib/os_thread.h | /* File: "os_thread.h" */
/* Copyright (c) 2013-2017 by <NAME>, All Rights Reserved. */
#ifndef ___OS_THREAD_H
#define ___OS_THREAD_H
#include "os.h"
/*---------------------------------------------------------------------------*/
#define DECLARE_HASH_MUTEX(name,size) ___MUTEX name[size]
#define HASH_MUTEX_SIZE 6... |
frank-lesser/gambit | bench/src/fibfp.c | /* FIBFP -- Computes fib(35) using floating point */
#include <stdio.h>
#define FLOAT double
static FLOAT fib (FLOAT n)
{
if (n < 2.)
return n;
else
return fib (n-1.) + fib (n-2.);
}
int main (int argc, char *argv[])
{
int i;
FLOAT result;
int n = 35;
if (argc > 1)
n = atoi (argv[1]);
fo... |
frank-lesser/gambit | doc/x.c | #include <X11/Xlib.h>
static Display *display;
int x_initialize (char *display_name)
{
display = XOpenDisplay (display_name);
return display != NULL;
}
char *x_display_name (void)
{
return XDisplayName (NULL);
}
void x_bell (int volume)
{
XBell (display, volume);
XFlush (display);
}
|
frank-lesser/gambit | gsc/_ptree1.c | <reponame>frank-lesser/gambit<gh_stars>1-10
#ifdef ___LINKER_INFO
; File: "_ptree1.c", produced by Gambit v4.9.3
(
409003
(C)
"_ptree1"
(("_ptree1"))
(
"_ptree1"
"app-tag"
"begin-temp"
"case-temp"
"compilation-strategy"
"cond-temp"
"conj-tag"
"cst-tag"
"def-tag"
"dialect"
"disj-tag"
"do-temp"
"dsssl"
"extended"
"fut-ta... |
frank-lesser/gambit | lib/actlog.h | /* File: "actlog.h" */
/* Copyright (c) 2016 by <NAME>, All Rights Reserved. */
#ifndef ___ACTLOG_H
#define ___ACTLOG_H
/*---------------------------------------------------------------------------*/
extern ___SCMOBJ ___setup_actlog_pstate
___P((___processor_state ___ps),
());
extern void ___cleanup_ac... |
AI-MD/assignments | imgproc.h | <gh_stars>1-10
#pragma once
#include <iostream>
#include "opencv2/core/core.hpp"
#include "opencv2/imgcodecs.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/imgproc/imgproc.hpp"
namespace IPCVL {
namespace IMG_PROC {
void calcHist(cv::InputArray src, int* histogram);
void calcHist_hs(cv::InputArray... |
AI-MD/assignments | examples.h | #pragma once
#include <iostream>
#include "opencv2/core/core.hpp"
#include "opencv2/imgcodecs.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/imgproc/imgproc.hpp"
namespace IPCVL {
namespace EXAMPLE {
void ChangeContrastAndBrightness(cv::InputArray src, cv::OutputArray dst, double alpha, int beta);
... |
AI-MD/assignments | utils.h | #pragma once
#include <iostream>
#include "opencv2/core/core.hpp"
#include "opencv2/imgcodecs.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/imgproc/imgproc.hpp"
namespace IPCVL {
namespace UTIL {
enum CONNECTIVITIES {
NAIVE_FOURWAY = 0,
NAIVE_EIGHT_WAY,
EFFICIENT_FOURWAY
};
int quantiz... |
zz-zigzag/bioinformatics | tools/DonorSim.c | /* The MIT License
Copyright (C) 2015 zz_zigzag <<EMAIL>>
*/
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <time.h>
#include <sys/stat.h>
#define PACKAGE_VERSION "0.1.1"
typedef struct
{
char *chr;
char *ref, *alt;
int brk1, brk2, len;
char type; //D:... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.