repo_name stringlengths 5 122 | path stringlengths 3 232 | text stringlengths 6 1.05M |
|---|---|---|
sethcoder/cc65 | src/cc65/coptneg.c | /*****************************************************************************/
/* */
/* coptneg.c */
/* */
... |
sethcoder/cc65 | include/atmos.h | /*****************************************************************************/
/* */
/* atmos.h */
/* */
... |
sethcoder/cc65 | testcode/lib/strncmp-test.c | <reponame>sethcoder/cc65<gh_stars>1-10
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
static const char S1[] = {
'h', 'e', 'l', 'l', 'o', ' ', 'W', 'o', 'r', 'l', 'd', '\0', 'A'
};
static const char S2[] = {
'h', 'e', 'l', 'l', 'o', ' ', 'w', 'o', 'r', 'l', 'd', '\0', 'B'
};
int main (void)
{
... |
sethcoder/cc65 | libsrc/common/abort.c | <filename>libsrc/common/abort.c<gh_stars>1-10
/*
** abort.c
**
** <NAME>, 02.06.1998
*/
#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
void abort (void)
{
raise (SIGABRT);
fputs ("ABNORMAL PROGRAM TERMINATION\n", stderr);
exit (3);
}
|
sethcoder/cc65 | testcode/lib/em-test.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <conio.h>
#include <em.h>
#define FORCE_ERROR1 0
#define FORCE_ERROR2 0
#define PAGE_SIZE 128 /* Size in words */
#define BUF_SIZE (PAGE_SIZE + PAGE_SIZE/2)
static unsigned buf[BUF_SIZE];
static ... |
sethcoder/cc65 | include/apple2enh.h | /*****************************************************************************/
/* */
/* apple2enh.h */
/* */
... |
sethcoder/cc65 | include/serial.h | <filename>include/serial.h
/*****************************************************************************/
/* */
/* serial.h */
/* ... |
sethcoder/cc65 | include/limits.h | /*****************************************************************************/
/* */
/* limits.h */
/* */
... |
sethcoder/cc65 | testcode/lib/snprintf-test.c | /*
** Test a function that formats and writes characters into a string buffer.
** This program does not test formatting. It tests some behaviors that are
** specific to the buffer. It tests that certain conditions are handled
** properly.
**
** 2015-07-17, <NAME>
*/
#include <conio.h>
#include <errno.h>
#include <st... |
sethcoder/cc65 | src/ar65/library.c | /*****************************************************************************/
/* */
/* library.c */
/* */
... |
sethcoder/cc65 | include/_atarios.h | <reponame>sethcoder/cc65
/*****************************************************************************/
/* */
/* _atarios.h */
/* ... |
sethcoder/cc65 | testcode/lib/signal-test.c | <reponame>sethcoder/cc65
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <signal.h>
void __fastcall__ sighandler (int sig)
{
printf ("Got signal #%d\n", sig);
}
int main (void)
{
if (signal (SIGSEGV, sighandler) == SIG_ERR) {
printf ("signal failure %d: %s\n", errno, strerror (er... |
sethcoder/cc65 | src/cc65/stmt.h | <gh_stars>1-10
/*****************************************************************************/
/* */
/* stmt.h */
/* ... |
sethcoder/cc65 | include/stdlib.h | /*****************************************************************************/
/* */
/* stdlib.h */
/* */
... |
sethcoder/cc65 | src/da65/scanner.c | /*****************************************************************************/
/* */
/* scanner.c */
/* */
... |
sethcoder/cc65 | util/cbm/cbmcvt.c | /* cbmcvt.c -- PetSCII <--> ISO-8859-1 Conversion Filter Tool */
/* 2010-09-06, <NAME> */
#include <stdio.h>
#include <unistd.h>
/* Translation table ISO-8859-1 -> PetSCII */
static const unsigned char CTPET[256] = {
0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x14,0x09,0x0D,0x11,0x93,0x0A,0x0E,0x0F,
0x10,0x0B,0... |
sethcoder/cc65 | src/cc65/assignment.c | <filename>src/cc65/assignment.c
/*****************************************************************************/
/* */
/* assignment.c */
/* ... |
sethcoder/cc65 | libsrc/geos-common/common/abort.c | /*
** abort.c
**
** Maciej 'YTM/Elysium' Witkowiak 15.7.2001
*/
#include <stdlib.h>
#include <geos.h>
void abort (void)
{
ExitTurbo();
DlgBoxOk(CBOLDON "ABNORMAL PROGRAM", "TERMINATION." CPLAINTEXT);
exit(3);
}
|
sethcoder/cc65 | testcode/lib/strpbrk-test.c | <reponame>sethcoder/cc65
#include <stdio.h>
#include <string.h>
static const char fox[] = "The quick brown fox jumped over the lazy dogs.";
void main (void)
{
printf ("Testing strpbrk():\n");
if (strpbrk (fox, "qwerty") != &fox[2]) {
printf ("\nThe first 'e' wasn't found.\n");
}
if (strpbrk (f... |
sethcoder/cc65 | include/telestrat.h | /*****************************************************************************/
/* */
/* telestrat.h */
/* */
... |
sethcoder/cc65 | src/cc65/litpool.c | <filename>src/cc65/litpool.c
/*****************************************************************************/
/* */
/* litpool.c */
/* ... |
sethcoder/cc65 | test/bdiff.c | <filename>test/bdiff.c
// minimal tool to compare two binaries
#include <stdlib.h>
#include <stdio.h>
int main(int argc, char *argv[])
{
FILE *f1, *f2;
if (argc < 3) {
return EXIT_FAILURE;
}
f1 = fopen(argv[1], "rb");
f2 = fopen(argv[2], "rb");
if ((f1 == NULL) || (f2 == NULL)) {
... |
sethcoder/cc65 | src/cc65/coptpush.c | /*****************************************************************************/
/* */
/* coptpush.c */
/* */
... |
547/SWExtensions | Sources/SWExtensions.h | <filename>Sources/SWExtensions.h
//
// SWExtensions.h
// SWExtensions
//
// Created by <NAME> on 2019/6/18.
// Copyright © 2019 Seven. All rights reserved.
//
#import <UIKit/UIKit.h>
//! Project version number for SWExtensions.
FOUNDATION_EXPORT double SWExtensionsVersionNumber;
//! Project version string for SW... |
cenzuen/swiftAddressBook | swiftTest-10 AddressBook/ocModel/ocBaseModel.h | //
// ocBaseModel.h
// swiftTest-10 AddressBook
//
// Created by joey0824 on 2017/6/6.
// Copyright © 2017年 JC. All rights reserved.
//
#import <Foundation/Foundation.h>
@class LKDBHelper;
@interface ocBaseModel : NSObject
+ (LKDBHelper *)getUsingLKDBHelper;
@end
|
cenzuen/swiftAddressBook | Pods/Target Support Files/Pods-swiftTest-10 AddressBook/Pods-swiftTest-10 AddressBook-umbrella.h | <reponame>cenzuen/swiftAddressBook
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#endif
FOUNDATION_EXPORT double Pods_swiftTest_10_AddressBookVersionNumber;
FOUNDATION_EXPORT const unsigned char Pods_swiftTest_10_AddressBookVersionString[];
|
cenzuen/swiftAddressBook | swiftTest-10 AddressBook/addressBook-Bridging-Header.h | //
// addressBook-Bridging-Header.h
// swiftTest-10 AddressBook
//
// Created by joey0824 on 2017/6/7.
// Copyright © 2017年 JC. All rights reserved.
//
#ifndef addressBook_Bridging_Header_h
#define addressBook_Bridging_Header_h
#import "ocBaseModel.h"
#endif
|
JianyiCheng/Lily58 | mydesigns/mykeymap/keymap.c | /* Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) 2020 <NAME>
*
* You are free to:
*
* Share — copy and redistribute the material in any medium or format
* Adapt — remix, transform, and build upon the material
* for any purpose, even commercially.
*
* The licensor cannot revoke these freedoms as lo... |
JianyiCheng/Lily58 | mydesigns/mykeymap/config.h | <gh_stars>0
/*
Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) 2020 <NAME>
*
* You are free to:
*
* Share — copy and redistribute the material in any medium or format
* Adapt — remix, transform, and build upon the material
* for any purpose, even commercially.
*
* The licensor cannot revoke these f... |
mpberk/cse531-projects | project03/sem_test.c | <filename>project03/sem_test.c
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include "sem.h"
#include "threads.h"
#include "q.h"
int id (q_element *item)
{
return *((int*)(item->payload));
}
// ID counter for unique items being added to the queue
int counter = 0;
// Global Queue of ints
q_element *Q... |
mpberk/cse531-projects | project01/part1/read_write_m.c | // (c) <NAME> 2009
// permission to use and distribute granted.
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "monitor.h"
monitor_t read_write;
monitor_cond_t r_cond, w_cond;
int rwc = 0, wwc = 0, rc = 0, wc = 0, global_ID=0;
void reader_entry(int ID)
{
printf("[reader: #%d]\ttrying to read\n... |
mpberk/cse531-projects | project01/part1/lock_test.c | <reponame>mpberk/cse531-projects<filename>project01/part1/lock_test.c
// (c) <NAME> 2009
// permission to use and distribute granted.
#include <stdio.h>
#include <stdlib.h>
#include "threads.h"
typedef pthread_mutex_t lock_t;
lock_t L1;
void init_lock(lock_t *l)
{
pthread_mutex_init(l, NULL);
}
void lock(lo... |
mpberk/cse531-projects | project03/hongquy_Code/sem.h | <reponame>mpberk/cse531-projects<gh_stars>0
#ifndef SEM_H
#define SEM_H
#include "threads.h"
typedef struct Semaphore_t{
int counter;
TCB_t** Queue;
} Semaphore_t;
Semaphore_t* CreateSem(int InputValue){
Semaphore_t* newSem = (Semaphore_t*) malloc(sizeof(Semaphore_t));
newSem->counter = InputValue;
newSem->Queue... |
mpberk/cse531-projects | project01/part1/monitor.h | // (c) <NAME> 2009
// permission to use and distribute granted.
#include "threads.h"
typedef pthread_mutex_t monitor_t;
typedef pthread_cond_t monitor_cond_t;
void init_monitor(monitor_t *M)
{ pthread_mutex_init(M, NULL);}
void init_monitor_cond(monitor_cond_t *monitor_cond)
{ pthread_cond_init(monitor_cond, NU... |
mpberk/cse531-projects | project04/Hongquy_Code/msgs.h | <filename>project04/Hongquy_Code/msgs.h
#include "sem.h"
typedef struct message message;
typedef struct port port;
typedef struct set set;
//message contains array of nums, and has next and prev
struct message{
int nums[10];
message* next;
message* prev;
};
//port contains a queue of messages, a count to keep tra... |
mpberk/cse531-projects | project01/part1/prod_cons_s.c | <filename>project01/part1/prod_cons_s.c
// (c) <NAME> 2009
// permission to use and distribute granted.
#include <stdio.h>
#include <stdlib.h>
#include "sem.h"
#define N 4
semaphore_t empty, full, mutex;
int buffer[N];
int in = 0, out = 0, item_num=0, prod_delay = 1, cons_delay = 1;
void prod (int *arg)
{
while... |
mpberk/cse531-projects | project02/q_test.c | #include <stdio.h>
#include <stdlib.h>
#include "q.h"
int id (q_element *item)
{
return *((int*)(item->payload));
}
int main(int argc, char *argv[])
{
int item1_value = 1;
int item2_value = 2;
int item3_value = 3;
printf("Creating queue\n");
q_element *head = NewQueue();
printf("Creating item1\n");... |
mpberk/cse531-projects | project02/thread_test.c | // <NAME>
// <NAME>
// CSE 531 - Distributed and Multiprocessor Operating Systems
// Project 02
// Due October 7, 2020
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include "threads.h"
// Number of children functions to run
int count = 3;
// Global variable
int global = 0;
// Easily modifiable functi... |
mpberk/cse531-projects | project01/part2/proj-1.c | // CSE 531 - Distributed and Multiprocessor Operating Systems
// Project 1
// Due September 23, 2020
// <NAME>
// <NAME>
//
// Features:
// Program runs without any parameters, but can take 1 argument for specifying the number of children running (default 3)
// Semaphore synchronization scheme based on the solution... |
mpberk/cse531-projects | project02/hongquy/threads.h | #ifndef THREADS_H
#define THREADS_H
#include "q.h"
extern TCB_t** ReadyQ;
extern TCB_t* Curr_Thread;
int counter = 0;
void start_thread(void (*function)(void)){
void* stack = malloc(8192);
TCB_t* temp_tcb = NewItem();
init_TCB(temp_tcb, function, stack, 8192);
temp_tcb->thread_id = counter;
coun... |
mpberk/cse531-projects | project04/Hongquy_Code/msgs_test.c | <reponame>mpberk/cse531-projects<filename>project04/Hongquy_Code/msgs_test.c
// CSE 531 - Distributed and Multiprocessor Operating Systems
// Project 4
// Due November 11, 2020
// <NAME>
// <NAME>
#include "msgs.h"
//global ports
set* globalPorts;
void client1(){
//Making a message. Message is 1111111111
... |
mpberk/cse531-projects | project01/part1/prod_cons_m.c | // (c) <NAME> 2009
// permission to use and distribute granted.
#include <stdio.h>
#include <stdlib.h>
#include "monitor.h"
#define N 4
monitor_t buff_mon;
monitor_cond_t empty, full;
int buffer[N];
int in = 0, out = 0, count=0, item_num=0, prod_delay = 1, cons_delay = 1;
void prod (int *arg)
{
while (1){
... |
mpberk/cse531-projects | project02/hongquy/q_test.c | <filename>project02/hongquy/q_test.c<gh_stars>0
#include <stdio.h>
#include <stdlib.h>
#include "q.h"
int id (TCB_t *item)
{
return item->thread_id;
}
TCB_t** ReadyQ;
TCB_t* Curr_Thread;
int main(int argc, char *argv[])
{
printf("Creating queue\n");
ReadyQ = newQueue();
// ReadyQ at this point should be {h... |
mpberk/cse531-projects | project04/Hongquy_Code/TCB.h | <filename>project04/Hongquy_Code/TCB.h<gh_stars>0
#ifndef TCB_H
#define TCB_H
#include <ucontext.h>
#include <string.h>
#include <stdio.h>
typedef struct TCB_t TCB_t;
struct TCB_t{
TCB_t* next;
TCB_t* prev;
ucontext_t context;
int thread_id;
};
void init_TCB(TCB_t* tcb, void* function, void* stackP, int stack_s... |
mpberk/cse531-projects | project02/hongquy/q.h | <filename>project02/hongquy/q.h
#ifndef Q_H
#define Q_H
#include <stdlib.h>
#include <stdio.h>
#include "TCB.h"
TCB_t* NewItem(){
TCB_t* newPtr = (TCB_t*) malloc(sizeof(TCB_t));
newPtr->next = NULL;
newPtr->prev = NULL;
// newPtr->thread_id = NULL;
getcontext(&(newPtr->context));
return newPtr;
}
TCB_t** new... |
mpberk/cse531-projects | project02/hongquy/thread_test.c | <reponame>mpberk/cse531-projects<filename>project02/hongquy/thread_test.c
#ifndef THREAD_TEST
#define THREAD_TEST
#include "threads.h"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
int globVar = 0;
void function1(){
int local = 0;
while (1) {
printf("In function 1\n");
sleep(1);
globVar++; loc... |
mpberk/cse531-projects | project02/q.h | #ifndef Q_H
#define Q_H
#include <stdio.h>
#include <stdlib.h>
typedef struct q_element q_element;
struct q_element
{
q_element *prev;
q_element *next;
void* payload;
};
q_element *NewItem()
{
q_element *new_item = (q_element*) malloc(sizeof(q_element));
new_item->prev = NULL;
new_item->next = NULL;
r... |
mpberk/cse531-projects | project01/part1/sem_test.c | // (c) <NAME> 2009
// permission to use and distribute granted.
#include <stdio.h>
#include <stdlib.h>
#include "threads.h"
typedef struct semaphore_t {
pthread_mutex_t mutex;
pthread_cond_t cond;
int count;
} semaphore_t;
void init_sem(semaphore_t *s, int i)
{
s->count = i;
pthread_mutex_i... |
mpberk/cse531-projects | project01/part2/threads.h | <reponame>mpberk/cse531-projects
// (c) <NAME> 2009
// permission to use and distribute granted.
#include <pthread.h>
pthread_t start_thread(void *func, int *arg)
{
pthread_t thread_id;
int rc;
printf("In main: creating thread\n");
rc = pthread_create(&thread_id, NULL, func, arg);
if (rc){
... |
mpberk/cse531-projects | project01/part1/race-p.c | <reponame>mpberk/cse531-projects<gh_stars>0
// (c) <NAME> 2009
// permission to use and distribute granted.
#include <stdio.h>
#include <stdlib.h>
#include "threads.h"
int x;
func1()
{int i = 0;
printf("Thread 1 - running\n");
for (i=0; i<100000000; i++) x++;
printf("Thread 1: x = %d\n", x);
printf("... |
mpberk/cse531-projects | project03/sem.h | <filename>project03/sem.h
#ifndef SEM_H
#define SEM_H
#include "threads.h"
typedef struct Semaphore_t
{
int counter;
q_element *Queue; // Queue of TCB_t's
} Semaphore_t;
Semaphore_t *CreateSem(int InputValue)
{
// Mallocs a semaphore structure
Semaphore_t* newSem = (Semaphore_t*) malloc(sizeof(Semaphore_t));... |
mpberk/cse531-projects | project03/hongquy_Code/read_write.c | <filename>project03/hongquy_Code/read_write.c<gh_stars>0
// CSE 531 - Distributed and Multiprocessor Operating Systems
// Project 3
// Due October 26, 2020
// <NAME>
// <NAME>
#include "sem.h"
Semaphore_t* r_sem;
Semaphore_t* w_sem;
int rwc = 0, wwc = 0, rc = 0, wc = 0, global_ID = 0;
void reader_entry(int ID){
p... |
mpberk/cse531-projects | project01/part1/thread_test.c | <gh_stars>0
// (c) <NAME> 2009
// permission to use and distribute granted.
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
int global=0;
void function_1(int *arg)
{
int local = 0;
while (1){
printf("XXXXPrinting from Function 1 [arg = %d] global = %d local = %d\n", *arg, global, local);... |
mpberk/cse531-projects | project01/part1/race-c.c | <filename>project01/part1/race-c.c
// (c) <NAME> 2009
// permission to use and distribute granted.
#include <sched.h>
#include <stdio.h>
#include <stdlib.h>
void *stack;
int x=1;
func1()
{int i = 0;
printf("Thread 1 - running\n");
for (i=0; i<100000000; i++) x++;
printf("Thread 1: x = %d\n", x);
print... |
mpberk/cse531-projects | project03/threads.h | <gh_stars>0
#ifndef THREADS_H
#define THREADS_H
#include "q.h"
#include "TCB.h"
// Global queue of TCBs
q_element *ReadyQ;
// Global pointer to thread under execution
q_element *Curr_Thread;
// Global thread id count
int id_count = 0;
// Get ID of thread
int get_id (q_element *thread)
{
return ((TCB_t*)(thread->... |
mpberk/cse531-projects | project03/TCB.h | #ifndef TCB_H
#define TCB_H
#include <string.h>
#include <ucontext.h>
typedef struct TCB_t
{
int thread_id;
ucontext_t context;
} TCB_t;
void init_TCB (TCB_t *tcb, void *function, void *args, void *stackP, int stack_size)
// arguments to init_TCB are
// 1. pointer to the function, to be executed
// 2. pointe... |
mpberk/cse531-projects | project01/proj-1.c | #include <pthread.h>
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
pthread_t startThread(void* func, int* arg){
pthread_t threadID;
int rc;
printf("\nIn main: creating thread\n");
rc = pthread_create(&threadID, NULL, func, arg);
if(rc){
printf("Error, return code from pthread_create() is %d\n", rc)... |
shubhamsah/OpenEDU | C Programs/DS Programs/Sorting and Searching/QuickRand.c | /* Program to demonstrate Randomized quick sort (recursive) */
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
void quick(int x[] , int lb , int ub) ;
int partition(int x[] , int lb , int ub) ;
void show(int x[] , int lb , int ub) ;
void main()
{
int i , n , x[20] ;
clrscr() ... |
shubhamsah/OpenEDU | C Programs/Control Statements/P_111_333.c | <gh_stars>1-10
/* Pattern Problem - Program to generate all combinations of 1 2 3 using for loop. (Eg Print 111(Row 1), (112)(Row 2), (113)(Row 3)...(333)(Last Row)) */
#include <stdio.h>
#include <conio.h>
void main()
{
int i , j , k ;
clrscr() ;
printf("Required pattern is as follows:\n");
for(i=1 ; i<... |
shubhamsah/OpenEDU | C Programs/Control Statements/ELECTRIC.c | /*
An electric power distribution company charges its domestic consumer as follows:
Consumption Units Rate of Charge
0-200 0.50 per unit
201-400 Rs. 100 plus Rs. 0.65 per unit excess of 200
401-600 Rs. 230 plus Rs. 0.85 per unit excess of 400
601-above Rs. 390 plus Rs. 1.00 per unit excess of 60... |
shubhamsah/OpenEDU | C Programs/DS Programs/Trees/pre_to.c | /* Program to construct an expression tree using a prefix expression. Then use the expression tree to display the postfix and infix form of same prefix expression */
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
#include <string.h>
#define NULL 0
#define STACKSIZE 50
struct node
{
char ... |
lucasnvp/CMakeListDirectoryStructure | app/src/suma/suma.h | //
// Created by lucas on 11/06/19.
//
#ifndef CMAKEANDCUNIT_SUMA_H
#define CMAKEANDCUNIT_SUMA_H
int suma ();
#endif //CMAKEANDCUNIT_SUMA_H
|
lucasnvp/CMakeListDirectoryStructure | app/test/Run_main_Tests.c | //
// Created by lucas on 11/06/19.
//
#include "Run_main_Tests.h"
int main () {
CU_initialize_registry();
agregar_tests_suma();
CU_basic_set_mode(CU_BRM_VERBOSE);
CU_basic_run_tests();
CU_cleanup_registry();
return CU_get_error();
} |
lucasnvp/CMakeListDirectoryStructure | app/test/Test_Suma/Test_Suma.c | //
// Created by lucas on 11/06/19.
//
#include "Test_Suma.h"
void agregar_tests_suma() {
CU_pSuite suma = CU_add_suite("Suma", inicializar_suma, limpiar_suma);
CU_add_test(suma, "test_suma", test_suma);
}
int inicializar_suma () {
return 0;
}
int limpiar_suma () {
return 0;
}
void test_suma () {
... |
lucasnvp/CMakeListDirectoryStructure | app/test/Run_main_Tests.h | //
// Created by lucas on 11/06/19.
//
#ifndef CMAKEANDCUNIT_RUN_MAIN_TESTS_H
#define CMAKEANDCUNIT_RUN_MAIN_TESTS_H
#include <unistd.h>
#include "CUnit/Basic.h"
#include "Test_Suma/Test_Suma.h"
#endif //CMAKEANDCUNIT_RUN_MAIN_TESTS_H
|
lucasnvp/CMakeListDirectoryStructure | app/test/Test_Suma/Test_Suma.h | //
// Created by lucas on 11/06/19.
//
#ifndef CMAKEANDCUNIT_TEST_SUMA_H
#define CMAKEANDCUNIT_TEST_SUMA_H
#include <stdio.h>
#include <stdlib.h>
#include "CUnit/Basic.h"
#include <suma/suma.h>
void agregar_tests_suma();
int inicializar_suma();
int limpiar_suma();
void test_suma();
#endif //CMAKEANDCUNIT_TEST_SU... |
lucasnvp/CMakeListDirectoryStructure | app/src/suma/suma.c | <gh_stars>0
//
// Created by lucas on 11/06/19.
//
#include "suma.h"
int suma () {
return 5 + 5;
} |
lucasnvp/CMakeListDirectoryStructure | app/src/main.c | <gh_stars>0
#include <stdio.h>
#include "suma/suma.h"
int main() {
printf("Hello, World!\n");
int result = suma();
printf("La suma es: %d", result);
return 0;
} |
jusic/energiador | src/energiador.h | <reponame>jusic/energiador
#ifndef ENERGIADOR_H
#define ENERGIADOR_H
#include <sailfishapp.h>
#include "worker.h"
class Energiador : public QObject
{
Q_OBJECT
Controller* contr;
QTimer* timer;
QVariantList* list;
public:
Energiador() {
contr = new Controller;
timer = new QTimer(th... |
jusic/energiador | src/worker.h | #ifndef WORKER_H
#define WORKER_H
#include <QtQuick>
#include <sailfishapp.h>
class BatteryWorker : public QObject
{
Q_OBJECT
QThread workerThread;
public slots:
void checkBatteryStatus() {
// crude hacks to get instant data from the power sensor
QFile f("/sys/devices/LNXSYSTM:00/device:... |
daohu527/mtrace | trace.h | <filename>trace.h
#include <string>
class Trace {
public:
Trace();
~Trace();
std::string GenerateTraceId();
private:
std::string trace_id;
};
|
daohu527/mtrace | trace_id_holder.h | <filename>trace_id_holder.h
#include <string>
class TraceIdHolder {
public:
void set(std::string trace_id);
std::string get();
private:
std::string trace_id;
}; |
DrCrypto/darkcoin | src/instantx.h |
// Copyright (c) 2009-2010 <NAME>
// Copyright (c) 2009-2012 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef INSTANTX_H
#define INSTANTX_H
#include "bignum.h"
#include "sync.h"
#include "net.h... |
Midhun-MP/MMP_DeviceInfo | MMPDeviceInfo/MMPDeviceInfo.h | /*!
* @file MMPDeviceInfo.h
* @class MMPDeviceInfo
* MMPDeviceInfo
* @author Created by Midhun on 13/01/15.
* @copyright Copyright (c) 2015 Midhun. All rights reserved.
* @discussion This class can be used for getting the details of the iOS device/Simulator
*/
#import <UIKit/UIKit.h>
#pragma mark - Constants & ... |
miyamotok0105/deeplearning-learning-sample | src/cuda_sample/sample1/sample.h | #ifndef SAMPLE_H
#define SAMPLE_H
void cuda_kernel_exec(int n);
#endif /* SAMPLE_H */
|
miyamotok0105/deeplearning-learning-sample | src/cuda_sample/sample1/cuda_main.c | #include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <sys/time.h>
#include <unistd.h>
#include "sample.h"
double gettimeofday_sec()
{
struct timeval tv;
gettimeofday(&tv, NULL);
return tv.tv_sec + tv.tv_usec * 1e-6;
}
int main(int argc, char *argv[])
{
double t1,t2;
int n = 100;
if (argc > 1... |
bspar/eth-privatenet | tricky/oracle.c | /*
* Inspired by https://jansson.readthedocs.io/en/latest/_downloads/github_commits.c
* (MIT license)
*/
#define _GNU_SOURCE
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <stdio.h>
#include <sys/syscall.h>
#include <jansson.h>
#include <curl/curl.h>
// I hate using so many escapes - effecti... |
diablax2/bts | src/leveldb/include/leveldb/table.h | // Copyright (c) 2011 The LevelDB Authors. All rigBTS reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. See the AUTHORS file for names of contributors.
#ifndef STORAGE_LEVELDB_INCLUDE_TABLE_H_
#define STORAGE_LEVELDB_INCLUDE_TABLE_H_
#include <stdint.h>
... |
nieldk/updiprog | link.h | #ifndef LINK_H
#define LINK_H
#include <stdint.h>
#include <stdbool.h>
uint8_t LINK_ldcs(uint8_t address);
void LINK_stcs(uint8_t address, uint8_t value);
bool LINK_Init(char *port, uint32_t baudrate, bool onDTR);
bool LINK_SendKey(char *key, uint8_t size);
uint8_t LINK_ld(uint16_t address);
bool LINK_st(u... |
nieldk/updiprog | app.c | #include <stdio.h>
#include <unistd.h>
#include "devices.h"
#include "link.h"
#include "log.h"
#include "sleep.h"
#include "updi.h"
void APP_Reset(bool apply_reset)
{
//Applies or releases an UPDI reset condition
if (apply_reset == true)
{
LOG_Print(LOG_LEVEL_INFO, "Apply reset");
LINK_stcs... |
nieldk/updiprog | sleep.c | <reponame>nieldk/updiprog<gh_stars>10-100
#include "sleep.h"
void msleep(uint32_t msec)
{
#ifdef __MINGW32__
SleepEx(msec, false);
#endif // __MINGW32__
#ifdef __linux
usleep(msec*1000);
#endif // __linux
}
|
nieldk/updiprog | phy.c | <filename>phy.c
#include <unistd.h>
#include "com.h"
#include "log.h"
#include "phy.h"
#include "updi.h"
#include "sleep.h"
/** \brief Initialize physical interface
*
* \param [in] port Port name as string
* \param [in] baudrate Transmission baudrate
* \param [in] onDTR True if using DTR for power
* \... |
nieldk/updiprog | app.h | <reponame>nieldk/updiprog<filename>app.h
#ifndef APP_H
#define APP_H
#include <stdint.h>
#include <stdbool.h>
bool APP_EnterProgmode(void);
void APP_LeaveProgmode(void);
bool APP_WaitFlashReady(void);
bool APP_Unlock(void);
bool APP_ChipErase(void);
bool APP_ReadDataWords(uint16_t address, uint8_t *data, u... |
nieldk/updiprog | log.h | <reponame>nieldk/updiprog<filename>log.h
#ifndef LOG_H
#define LOG_H
#include <stdint.h>
enum {
LOG_LEVEL_INFO,
LOG_LEVEL_WARNING,
LOG_LEVEL_ERROR,
LOG_LEVEL_LAST
};
void LOG_Print(uint8_t level, char *msg, ...);
void LOG_SetLevel(uint8_t level);
#endif
|
nieldk/updiprog | sleep.h | <gh_stars>10-100
#ifndef SLEEP_H
#define SLEEP_H
#include <stdint.h>
#include <stdbool.h>
#ifdef __MINGW32__
#include <windows.h>
#include <unistd.h>
#endif // __MINGW32__
#ifdef __linux
#include <unistd.h>
#endif // __linux
void msleep(uint32_t usec);
#endif
|
nieldk/updiprog | ihex.c | <reponame>nieldk/updiprog
#include <stdio.h>
#include <ctype.h>
#include <string.h>
#include "ihex.h"
static uint8_t crc;
/** \brief Convert byte to string with HEX representation
*
* \param [in] byte One byte of data
* \return HEX representation as string
*
*/
static char* IHEX_AddByte(uint8_t byte... |
nieldk/updiprog | progress.c | <filename>progress.c<gh_stars>10-100
#include <stdio.h>
#include <string.h>
#include "progress.h"
/** \brief Print progress bar with prefix
*
* \param [in] iteration Current iteration
* \param [in] total Total number of iterations
* \param [in] prefix Prefix text
* \param [in] fill Char to use for fillin... |
nieldk/updiprog | devices.c | <reponame>nieldk/updiprog
#include <string.h>
#include "devices.h"
tDevice DEVICES_List[] =
{
{
"mega480x",
0x4000,
48 * 1024,
128,
0x0F00,
0x1000,
0x1100,
0x1280,
0x1300,
11
},
{
"mega320x",
0x4000,
32 * 1024,
128,
0x0F00,
0x... |
nieldk/updiprog | com.h | <filename>com.h
#ifndef COM_H
#define COM_H
#include <stdint.h>
#include <stdbool.h>
bool COM_Open(char *port, uint32_t baudrate, bool have_parity, bool two_stopbits);
int COM_Write(uint8_t *data, uint16_t len);
int COM_Read(uint8_t *data, uint16_t len);
uint16_t COM_GetTransTime(uint16_t len);
void COM_Wai... |
dreamflyforever/socket_file | client.c | <reponame>dreamflyforever/socket_file<filename>client.c
/*
* client send file name and receive file from server.
*
*/
#include<netinet/in.h>
#include<sys/types.h>
#include<sys/socket.h>
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <unistd.h>
#defin... |
dreamflyforever/socket_file | server.c | <gh_stars>0
/*
* server be sent file
*/
#include<netinet/in.h>
#include<sys/types.h>
#include<sys/socket.h>
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include <unistd.h>
#define SERVER_PORT 6666
#define LENGTH_OF_LISTEN_QUEUE 20
#define BUFFER_SIZE 1024
#define FILE_NAME_MAX_SIZE 512
int main(int argc... |
DYNXTSX/ESAIP_MobileBluetooth | Code/bluetooth.h | <gh_stars>0
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
int enovieMsg22(char *msg, char *port);
int enovieMsg(char *msg, char *port);
int main(); |
DYNXTSX/ESAIP_MobileBluetooth | Code/bluetooth.c | #include <stdlib.h>
#include <stdio.h>
#include <windows.h>
#include <conio.h>
#include <string.h>
#include <unistd.h>
#include "serialcom.h"
/* Fonction envoieMsg(char *msg, char *port) :
* ===========================================
* ==> msg : correspond au message à envoyé par bluetooth
* ==> port : correspond... |
DYNXTSX/ESAIP_MobileBluetooth | Code/IHM/bluetooth.c | <filename>Code/IHM/bluetooth.c
#include <stdlib.h>
#include <stdio.h>
#include <gtk/gtk.h>
//gcc `pkg-config --cflags gtk+-3.0` -o programme bluetooth.c `pkg-config --libs gtk+-3.0`
static GtkWidget *appareil, *label2;
static GtkWidget *comboH, *comboM;
void reloadBluetooth(GtkWidget* pWidget, gpointer data)
{
gch... |
DYNXTSX/ESAIP_MobileBluetooth | Code/serialcom.h | <filename>Code/serialcom.h
void serial_Write(char choice[]) {
HANDLE hComm; // using the serial port
char ComPortName[] = "\\\\.\\COM3"; // it depends on device
BOOL Status;
hComm = CreateFile(ComPortName,
GENERIC_READ | GENERIC_WRITE,
0,
NULL,
OPEN_EXISTING,
0,
NULL)... |
DYNXTSX/ESAIP_MobileBluetooth | Code/TransmissionBluetooth/sendMsg.c | <filename>Code/TransmissionBluetooth/sendMsg.c
#include<stdio.h>
#include <windows.h>
#include <conio.h>
#include <string.h>
int enovieMsg22(char *msg, char *port){
// Declare variables and structures
HANDLE hSerial;
DCB dcbSerialParams = {0};
COMMTIMEOUTS timeouts = {0};
// Open the highest availa... |
DYNXTSX/ESAIP_MobileBluetooth | Code/IHM/bluetooth.h | <reponame>DYNXTSX/ESAIP_MobileBluetooth
void fglobale(void);
|
vbence/pwxe | src/php_pwxe.c | /*
* This file is part of Pwxe, a PHP extension to stop execution
* of writable files.
*
* Author: <NAME> <<EMAIL>>
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "php.h"
#include "php_ini.h"
#include "php_pwxe.h"
#include "SAPI.h"
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#includ... |
vbence/pwxe | src/php_pwxe.h | /*
* This file is part of Pwxe, a PHP extension to stop execution
* of writable files.
*
* Author: <NAME> <<EMAIL>>
*/
#ifndef PHP_PWXE_H
#define PHP_PWXE_H 1
#define PHP_PWXE_VERSION "0.1"
#define PHP_PWXE_EXTNAME "PWXE"
extern void pwxe_zend_init(TSRMLS_D);
extern void pwxe_zend_shutdown(TSRMLS_D);
PHP_MINI... |
BingyangWu/6.828-2018 | user/sh.c | <reponame>BingyangWu/6.828-2018<gh_stars>0
#include <inc/lib.h>
#define BUFSIZ 1024 /* Find the buffer overrun bug! */
int debug = 0;
// gettoken(s, 0) prepares gettoken for subsequent calls and returns 0.
// gettoken(0, token) parses a shell token from the previously set string,
// null-terminates that token, stor... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.