text
stringlengths
9
5.83M
/* * Copyright (C) 2017 GreenWaves Technologies * All rights reserved. * * This software may be modified and distributed under the terms * of the BSD license. See the LICENSE file for details. * */ #include <stdio.h> // AutoTiler Libraries #include "AutoTilerLib.h" // FIR generator #include "FirGenerator.h" ...
/* Name: Nikki Truong Student number: 112314174 IPC144 - Section H Workshop 6 - In-lab */ #include <stdio.h> #define distRate1 0.69 // Rate per Kilometer from 0km to 100km (inclusive) #define distRate2 0.49 // Rate per Kilometer above 100km // Structure Declaration for Vehicle Rentals struct Rental { int id;...
#include <stdio.h> #include <stdlib.h> int main(int argc, char const *argv[]) { int fahr; for ( fahr = 0; fahr <= 300; fahr = fahr + 20) { printf("%d\t%3.6f\n",fahr, 5.0 * (fahr - 32) / 9.0 ); } return 0; }
#ifndef EXTER_INT_C #define EXTER_INT_C #include "avr_cmsis.h" //*********************************************************************** // Настройка события прерывания void INT0_SETTING(int_set0_t set) { mcucr->isc0=set; } void INT1_SETTING(int_set0_t set) { mcucr->isc1=set; } void INT2_SETTING(int_set2_t set) { mcu...
/* Copyright (c) 2013 The F9 Microkernel Project. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef SCHED_H_ #define SCHED_H_ #include <os/thread.h> typedef enum { SSI_SOFTIRQ, /* Kernel thread */ SSI_INTR_THREAD, SSI_ROOT_TH...
#include <std.h> #include <kabaal.h> inherit ROOM; void create() { ::create(); set_short("Logan gates"); set_long("This is the base of a small, old looking city. Off to the " "northeast it looks as though there is a peak of a mountain, " "but trees cover up viewing the entire thing. Several "...
/* See LICENSE file for copyright and license details. */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #include <unistd.h> #include <utmp.h> #include "config.h" #include "util.h" static void usage(void) { eprintf("usage: %s [-ml]\n", argv0); } int main(int argc, char *argv[]) { stru...
#include <stdio.h> #include <unistd.h> #include <assert.h> #include <errno.h> #include <stdint.h> #include <inttypes.h> #include <string.h> // for memset ///////////////////////// // CONSTANTS/TYPES ///////////////////////// #define NUMBUCKETS 32 // can't go too far above bit size... be pessimistic #define MIN_PHY...
#include <stdio.h> #include <math.h> // ACCEPTED int term(int n) { return n*n + n + 41; } int is_prime(int n) { int i; int x = sqrt(n) + 1; for(i=2; i<=x; i++) { if(n % i == 0) return 0; } return 1; } int main(int argc, char *argv[]) { int s[10010] = {0}; int a, b, i, count_prime, t, u; double per...
/* ** EPITECH PROJECT, 2018 ** Dante ** File description: ** Generator header */ #ifndef GENERATOR_H_ #define GENERATOR_H_ typedef struct s_cell t_cell; typedef struct s_game_info t_game_info; struct s_cell { int passed; char value; int *neighbour; }; struct s_game_info { int x_map; int y_map; int perfect; ...
#ifndef DEBUG_H_ #define DEBUG_H_ #include <stdio.h> int dwait(int msgtype, char *f, ...); void promptforflags(); void dumpflags(int r, int c); void toggledebug(); int getscrpos(char *msg, int *r, int *c); void timehistory(FILE *f, char sep); #endif
/* * @(#)limits.h 1.5 (ULTRIX) 10/21/85 */ /************************************************************************ * * * Copyright (c) 1985 by * * Digital Equipment Corporation, Maynard, MA * * All rights reserved. * * * * This software is furnished under a license and may be u...
/* CS261- Assignment 1 - Q.4*/ /* Name: Varun Gadiraju * Date: 10/12/2014 * Solution description: This program expands on the program in Q1.c by sorting array of student scores in ascending order */ #include <stdio.h> #include <stdlib.h> #include <time.h> typedef struct student{ int id; int score; }Student; i...
#ifndef __SYSTEM_H__ #define __SYSTEM_H__ #include "stm32l0xx.h" void stop_enable(); void stop_disable(); #endif
#ifndef WAVEFILE_H_ #define WAVEFILE_H_ #include <stdio.h> #include <stdint.h> typedef struct wavefile_s { int valid; uint16_t format, channels; uint32_t sample_rate, data_rate; uint16_t frame_size, bits_per_sample; void *data, *filemem; uint32_t data_size; } wavefile_t; int wavefile_parse(wa...
#include <math.h> #include <stdlib.h> #include <stdio.h> #include "Gap.h" void InitData(short int *Data, int Size, int Pad, int Freq) { int i; float Theta = (2*M_PI)/Freq; for (i=0; i<Size-Pad; i++) { if ((i%128)==0) printf("**** %d\n", i); // Data[i] = FP2FIXR(sinf(Theta*i), 15); Data[2*i] = FP2FIXR(cosf(T...
/********************************************************************************************************* ** ** 中国软件开源组织 ** ** 嵌入式实时操作系统 ** ** SylixOS(TM) LW : long wing ** ** Copyright Al...
#include <stdio.h> int main(void) { int a[3][4] = {0, 1, 2}; int **q; int *c[4]; c[0] = a[0]; q = a; printf("%d\n", a[0][2]); printf("%d\n", c[0][2]); printf("%d\n", *(*((int(*)[4])q+0))+2); printf("%f\n", 3); }
#include "date.h" #include "DBDefines.h" #include <stdlib.h> #include <stdio.h> #include <string.h> #include <ctype.h> Date* str2date(char* str){ Date* ret = new(Date,1); char sday[3]; char smonth[3]; char syear[5]; for(int i=0;i<4;i++){ syear[i]=str[i]; } syear[4]=0; for(int i=5;i<7;i++){ smon...
/* read.c 4.1 82/12/04 */ #include "SYS.h" SYSCALL(_read) ret
#ifndef _H_CHAR_STAT_ #define _H_CHAR_STAT_ int charstat(int argc, char *argv[]); #endif // _H_CHAR_STAT_
/*++ Copyright (C) Microsoft. All rights reserved. Module Name: time.c Abstract: Implementation of timer I/O routines for an EFI firmware boot environment. Environment: Boot --*/ // // ------------------------------------------------------------------- Includes // #inclu...
#include <std.h> inherit MONSTER; void create() { ::create(); set_name("mountain lion"); set_short("mountain lion"); set_long( "This large mountain lion roams the plains, searching for food." ); set_id(({"lion", "mountain lion"})); set_level(15); set_race("cat"); set_body_ty...
#include <stdio.h> int main(void) { int x,y,rem,lcm,gcd,a,b; printf("\n enter the first number:"); scanf("%d",&x); printf("\n enter the second number:"); scanf("%d",&y); a=x; b=y; do { rem=x%y; if(rem==0) break; x=y; y=rem; }while(rem!=0); gcd=y; lcm=(a*b)/gcd; printf("\n the lcm of the given number is: %d",lcm); ret...
#include <stdlib.h> #include <stdio.h> int main(int argc, char **argv) { char *options = NULL; if (argc > 1) options = argv[1]; ps(options); return 0; }
//Program to take print numbers as long as they are positive #include<stdio.h> int main() { int i; while(1) { printf("\nEnter number: "); scanf("%d", &i); if(i<0) break; printf("\nEntered value of i = %d", i); } printf("\nNegative number entered!"); }
/** Author: Tanya Yeu (yeut@oreonstate.edu) Assignment 3: smallsh CS344 Operating Systems 1 Due Date: 2021-05-03 **/ #include <sys/types.h> #include <unistd.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <signal.h> #include <fcntl.h> #include <sys/wait.h> // for waitpid int allowBg = 1; #def...
/* Copyright (c) [2019] juruoyun developer team Juruoyun basic lib is licensed under the Mulan PSL v1. You can use this software according to the terms and conditions of the Mulan PSL v1. You may obtain a copy of Mulan PSL v1 at: http://license.coscl.org.cn/MulanPSL THIS SOFTWARE IS PROVIDED ON AN "A...
#include <stdio.h> // Returns position in first string where any char in second string is found // Returns -1 if none is found int findpos(char s1[20], char s2[20]) { int i,j; char * p; for(i = 0; s1[i] != '\0'; i ++) { p = strchr(s2,s1[i]); if(p != NULL ) return p - s1; ...
#include <stdio.h> #include <stdlib.h> main(){ int edad = 19; printf("La edad en segundos es ",edad,365,24,60,60,edad*365*24*60*60); printf("\n"); system("pause"); }
$NetBSD: patch-builtin_receive-pack.c,v 1.1 2019/11/08 12:52:30 ryoon Exp $ * Do not conflict hmac(3) of NetBSD --- builtin/receive-pack.c.orig 2019-11-04 05:07:07.000000000 +0000 +++ builtin/receive-pack.c @@ -417,7 +417,7 @@ static int copy_to_sideband(int in, int return 0; } -static void hmac(unsigned char *...
/* XPM */ static const char *aBREPSolidPCone_xpm[] = { /* width height ncolors chars_per_pixel */ "150 200 7670 2", /* colors */ " c Black", " . c #F1ADB8", " X c #CBE5FC", " o c #160E44", " O c #B1B1B1", " + c #361B1E", " @ c #514D6A", " # c #A3B5B7", " $ c #85757C", " % c #4B3457", " & c #C2C7F0", " * c #1F2425", "...
#pragma once //const int WINSIZEX = 800; //const int WINSIZEY = 600; const int WINSIZEX = 1024; const int WINSIZEY = 768;
#include <stdio.h> #include <assert.h> #include <stdlib.h> #include <string.h> struct Person { char *name; int age; int height; int weight; }; // this shows how to create a struct on the stack, which means just like you've been making any other variable. int main(int argc, char *argv[]) { struct Person who = {"...
#ifndef __included_colours_h #define __included_colours_h extern int paw_black; extern int paw_blue; extern int paw_red; extern int paw_green; extern int paw_lightgrey; extern int paw_darkgrey; void init_thepaw_colours(); #endif /* __included_colours_h */
/* *************************************************************************** * * COPYRIGHT: $Company: AVL Software and Functions GmbH $ * FILENAME: $Source: Wdg.h $ * COMPILER: Tasking * PROZESSOR: Tricore * * DATE OF CREATION: 19.05.2010 * LAST REVISION: $Da...
#include <lodos.h> #include <std.h> inherit ROOM; void create() { ::create(); set_properties((["indoors" : 1, "light" : 2, "night light" : 1])); set_short("West of the temple entrance"); set_day_long("This room is just west of the temple's entrance. Along the " "southern wall are sta...
#include <stdio.h> #include <stdlib.h> /******************************************************** 问题:现有一张地图,地图上 0 表示海洋,其他数字表示陆地, 计算一共有多少个岛屿,上下左右相连的点表示同一个岛屿 解决:通过深度优先搜素解决 *********************************************************/ //地图的大小 int n, m; /** * 深度优先搜索 * @Param x 行坐标 * @Param y 列坐标 * @Param color 要染的颜色 * ...
#include <stdio.h> #include <stdlib.h> #include <locale.h> #include "funcoes.h" int main() { setlocale(LC_ALL,""); int x,y,n; int * vetor[5]; int controle; printf("Informe até onde vai a sequência\n"); for(controle=0; controle < 5; controle++) { scanf("%d",&vetor[controle]); } ex1(&...
#ifndef lint static char sccsid[] = "@(#)telnetd.c 1.5 (ULTRIX) 9/30/85"; #endif /************************************************************************ * * * Copyright (c) 1985 by * * Digital Equipment Corporation, Maynard, MA * * All rights reserved. * * * * This software is fur...
/********************************************************************************************************* ** ** 中国软件开源组织 ** ** 嵌入式实时操作系统 ** ** SylixOS(TM) LW : long wing ** ** Copyright Al...
#include "soundpipe.h" #include "md5.h" #include "tap.h" #include "test.h" typedef struct { sp_autowah *autowah; sp_spa *disk; } UserData; int t_autowah(sp_test *tst, sp_data *sp, const char *hash) { uint32_t n; int fail = 0; SPFLOAT disk = 0, autowah = 0; UserData ud; sp_autowah_create...
#appendto GoldBar local value; public func SetValue(int new_value) { value = new_value; UpdatePicture(); } // Give the player picking up the bar extra money public func RejectEntrance(object container) { if (!container->~IsClonk()) return false; var plr = container->GetOwner(); if (plr && plr.Type != C4PT_User)...
#include<stdio.h> #include<stdlib.h> #include<string.h> typedef struct student{ int roll_no; char name[30]; int marks[3]; float percentage; } Student; void printMenu(){ printf("\n------------------------\n"); printf("1. Search\n"); printf("2. Modify\n"); printf("3. Display all Students\n"); printf("4. Displa...
//D.H.S. #define DHS_FIRST_ITEM (DHS_ITEM *)0xBAD0 #define DHS_LAST_ITEM (DHS_ITEM *)0xBAD1 #define DHS_NULLITEM (DHS_ITEM *)-1 #define DHS_ZERO 0 #define DHS_NULL -1 #define DHS_LOCKDRAW 1 #define DHS_UNLOCKDRAW 0 #define DHS_ITEM_TOP 1 #define DHS_ITEM_BOTTOM -1 #de...
#include <stdlib.h> #include <stdio.h> void my_show_address(int *ptr) { printf("%p\n", ptr); } /* int main() */ /* { */ /* int i; */ /* int *ptr; */ /* i = 1; */ /* ptr = &i; */ /* my_show_address(ptr); */ /* return(0); */ /* } */
#include <msp430.h> #include "ds18x20.h" #include <math.h> #define MIC0 BIT0 #define MIC1 BIT1 #define MIC2 BIT2 #define MIC3 BIT3 #define MIC4 BIT4 #define SERVO_HORZ BIT0 #define SERVO_VERT BIT1 #define BUTTON BIT2 #define SERVO_RST 9600 #define SERVO_WAIT 27 //servo takes .17sec/60degrees. So for 180 degrees take...
// Ques: // WAP to find the time taken by a program to perform selection sorting using 'gettimeofday' function. // CODE: #include <stdio.h> #include <assert.h> #include <sys/time.h> void exch(long int a[], long int i, long int min); void selectionSorting(long int a[], long int size) { long int i, j, min; fo...
#include "libft.h" void *ft_calloc(size_t num, size_t size) { size_t n; void *word; n = num * size; word = malloc(n); if (word) ft_memset(word, 0, n); return (word); }
#include "header.h" void compile(char *); /* Maman 14 - Assembler program to compile a file into a machine code * if success creating a *.ob file with the memory lines (also extern and entry files if there are parameters)*/ /* main method * getting file names parameters in the command line */ int main(int argc, char...
/******************************************************************************* File Name: winc1500_udp_client.c Summary: WINC1500 udp client demo. Description: This demo performs the following steps: 1) Starts Wi-Fi connection to the specified Access Point (AP) 2) Waits f...
/* * PROJECT 4: Particle Swarm Optimization, Firefly Algorithm, and Harmony Search Author: Holly Strauch CS 471 Project 4 May 19, 2019 This program uses Particle Swarm Optimization (PSO), Firefly Algorithm (FA), and Harmony Search (HS) to attempt to optimize the fitness values of 18 different functions. The equa...
#ifndef lint static char *sccsid = "@(#)IIretrieve.c 1.1 (ULTRIX) 1/8/85"; #endif lint /************************************************************************ * * * Copyright (c) 1984 by * * Digital Equipment Corporation, Maynard, MA * * All rights reserved. * * * * This software ...
/* * File : cheater.h * Project : PVZ * Author : ze00 * Email : zerozakiGeek@gmail.com * Date : 2017-08-15 * Module : * License : MIT */ #ifndef __CHEATER__H #define __CHEATER__H #include <stdio.h> #include <stdlib.h> #include <string.h> #include <scanmem/scanmem.h> #include "pvz.h" #include...
/** Generated Main Source File File Name: main.c Summary: This is the main file generated using PIC10 / PIC12 / PIC16 / PIC18 MCUs Description: This header file provides implementations for driver APIs for all modules selected in the GUI. Generation Information : Product R...
/* Note:Your choice is C IDE */ #include "stdio.h" #include<math.h> #define f(i) (i)*(i) main() { double x1,y1,x2,y2,x3,y3; double j,k,l; while(scanf("%lf%lf%lf%lf%lf%lf",&x1,&y1,&x2,&y2,&x3,&y3)!=EOF) { j=sqrt(f(x1-x2)+f(y1-y2)); k=sqrt(f(x3-x2)+f(y3-y2)); l=sqrt(f(x1-x3)+f(y1-y3)); ...
{ //=========Macro generated from canvas: c1/c1 //========= (Wed Mar 30 03:17:33 2016) by ROOT version5.30/03 /* TCanvas *c1 = new TCanvas("c1", "c1",12,61,700,500); c1->Range(-0.625,-2087.794,5.625,18790.14); c1->SetFillColor(0); c1->SetBorderMode(0); c1->SetBorderSize(2); c1->SetFrameBorderMode(0); ...
//// //// Groove.h //// multiDiscTest //// //// Created by cemcakmak on 26/02/15. //// //// // //#pragma once // //#ifndef __multiDiscTest__Groove__ //#define __multiDiscTest__Groove__ // //#include <stdio.h> //#include "ofMain.h" //#include "Disc.h" //#include "Player.h" // // //class Groove{ // //public: // ...
void insert_sort (data_t* array, int n) { int i, j; data_t buf; for (i = 1; i < n; i ++) { buf = array[i]; j = i - 1; while ((array[j] > buf) && (j >= 0)) { array[j + 1] = array[j]; j--; } array[j + 1] = buf; } return; }
#include <stdio.h> int main() { int fatorial, res; scanf("%d", &res); for (fatorial = 1; res > 1; res = res -1) { fatorial = fatorial * res; } printf("Fatorial: %d", fatorial); int numero, resultado = 0; scanf("%d", &numero); for (int i = 2; i <= numero / 2; i++) { if (numero % i == 0) { resultado...
#include <stdlib.h> #include <string.h> #include <math.h> #include "ram.h" #include "pcb.h" #include "kernel.h" #include "memorymanager.h" #define FRAME_COUNT (int) (RAM_SIZE / PAGE_SIZE) // 40/4 = 10 FRAMES double PAGE_SIZE = 4.0; // counts total nb of lines in a program double countLines(FILE *f) { char codeL...
//main.c #include <stdio.h> #include <stdlib.h> #include "./Luna_File.h" int main() { struct Luna_File *file = Luna_File.new((t_uchar)1, NULL); file->read(file, "test_files/00001_00010.txt"); file->print_lines(file); file->destruct(file); free(file); }
// Welch, Wright, & Morrow, // Real-time Digital Signal Processing, 2011 /////////////////////////////////////////////////////////////////////// // Filename: main.c // // Synopsis: Main program file for demonstration code // /////////////////////////////////////////////////////////////////////// #include "DSP_Confi...
#include<stdio.h> #include<stdlib.h> typedef int Status; typedef struct BitNode { int data; struct BitNode* lchild, * rchild; }BSTNode, * BSTree; BSTree SearchBST(BSTree T, int key, BSTree parent, BSTree& p); BSTree InsertBST(BSTree T, int key); BSTree CreateBST(BSTree T); void DeleteBST(BSTree T...
#include <stdio.h> char *ft_strncpy(char *dest, char *src, unsigned int n) { char *t; t = dest; while (n) { dest = src; if ((*t = *src)) n--; t++; } return (dest); } int main(int argc, char **argv) { char *d; ft_strncpy(d, argv[1], 2); printf("%s",d); return (0); }
#ifndef lint static char *sccsid = "@(#)dli_bind.c 1.11 ULTRIX 1/15/87"; #endif lint /* * Program dli_bind.c, Module DLI * * Copyright (C) 1985 by * Digital Equipment Corporation, Maynard, Mass. * * This software is furnished under a license and may be used and copied * only in accordance with the terms ...
#include <stdio.h> // See the README.txt file for the challenge description. struct time { int hours; int minutes; int seconds; }; struct time elapsed_time(struct time t1, struct time t2) { struct time elapsed = {0, 0, 0}; int total_time1, total_time2, difference; // conversion to circumvent times cross...
#include<stdio.h> int main() { int n,sum=0,rem=0,cube=0,temp; scanf("%d",&n); temp=n; while(n!=0) { rem=n%10; cube=pow(rem,3); sum=sum+cube; n = n/10; } if(sum==n) printf("Yes"); else printf("No"); return 0; }
/* rmf.c - remove a folder */ #include "../h/mh.h" #include "../h/local.h" #include <stdio.h> /* */ static struct swit switches[] = { #define INTRSW 0 "interactive", 0, #define NINTRSW 1 "nointerative", 0, #define HELPSW 2 "help", 4, NULL, NULL }; /* */ /* ARGSUSED */ main (argc, argv) int a...
#ifndef FIGHTDISPELLABLEENUM_H #define FIGHTDISPELLABLEENUM_H enum class FightDispellableEnum { DISPELLABLE = 1, DISPELLABLE_BY_DEATH = 2, DISPELLABLE_BY_STRONG_DISPEL = 3, REALLY_NOT_DISPELLABLE = 4 }; #endif // FIGHTDISPELLABLEENUM_H
#include <stdint.h> #include <stdbool.h> #include "inc/hw_memmap.h" #include "inc/hw_types.h" #include "driverlib/sysctl.h" #include "driverlib/gpio.h" #include "driverlib/debug.h" #include "driverlib/pwm.h" #include "driverlib/pin_map.h" #include "inc/hw_gpio.h" #include "driverlib/rom.h" #include "driverli...
#include <stdio.h> #define SIZE 80 char *_strncat(char *s,char *ct,int n); char *_strncpy(char *s,char *ct,int n); int _strncmp(const char *cs,const char *ct,size_t n); int main(){ char s[SIZE] = "HELLO "; char t[SIZE] = "EVERYONE"; char *p; int n = 4; printf("%s\n",s); printf("%s\n",t); ...
#ifndef FLURMP_CONFIRMATION_H #define FLURMP_CONFIRMATION_H #include "core/flurmp_impl.h" #include "menu/menu.h" /** * Creates a confirmation menu. * A confirmation menu should have an affirmative and a negative option, * such as "Yes" and "No". * * Params: * fl_context - a Flurmp context * * Returns: * ...
#pragma once #include "DX.h" typedef unsigned char byte; //typedef unsigned short ushort; void DirectInput_Initialize(HINSTANCE hInstance); void DirectInput_Initialize_Keyboard(); bool DirectInput_Key_State(int Key_Code); int Get_Controller1_Data(); int Get_Controller2_Data(); extern LPDIRECTINPUT8 DI; extern LPDIR...
/*Counting Characters * Rio Weber * 9-23-2015 * ASCII counter */ #include<stdio.h> #include<string.h> int main(int argc, char **argv) { char stringIn[1000]; char mostChar, leastChar; int total_Chars = 0; int total_Distinct = 0; int total_Alphabet = 0; int whiteSpace = 0; int digits = 0; int mostCommonChar = ...
/********************************************************************* * ejercicio22.c -- Integracion Simpson * * DESCRIPCION: * Calculo dela integral de la funcion f(x) usando la regla de simpson compuesta * En esta ocasion se emplea una estrategia distinta para repartir la carga * entre los distintos procesos * * AU...
#include <std.h> inherit ROOM; void create() { room::create(); set_properties( ([ "light" : 2, "indoors" : 1]) ); set_short("old road"); set_long( "The tree is now blocking your travel to the west. The town " "is off to the north. Your path is limited to going north and " "southwest. " ...
/* ** EPITECH PROJECT, 2019 ** MyRPG ** File description: ** create.h */ #ifndef MY_CREATE_OBJECT_H_ #define MY_CREATE_OBJECT_H_ #define STRY_PTR void (*ptr)(main_t *) #include "include_all.h" #include "main.h" typedef struct main_s main_t; typedef struct story story_t; typedef struct object object_t; object_t *cr...
#include<stdio.h> float a(int x){ }
#include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_SPI_CSN), MP_ROM_PTR(&pin_P1_06) }, { MP_ROM_QSTR(MP_QSTR_SPI_MISO), MP_ROM_PTR(&pin_P1_04) }, { MP_ROM_QSTR(MP_QSTR_SPI_MOSI), MP_R...
#include <lodos.h> #include <std.h> inherit ROOM; void create() { ::create(); set_properties(([ "town" : 1, "light" : 2, "night light" : 1 ])); set_short("En route south of lodos"); set_day_long("The road leads south and north. The air is comfortably " "cool. A light breeze shakes the few trees around t...
// Copyright (C) Microsoft. All rights reserved. #ifndef _UTIL_H #define _UTIL_H /////////////////////////////////////////////////////////////////////////////// // Defines #define TEST_FREQUENCY 1000 /////////////////////////////////////////////////////////////////////////////// // Macros #define BOOL_...
#define _PROTECTED_ALL_00010000020002a2_H #ifndef _OZ00010000020002a2P_H_ #define _OZ00010000020002a2P_H_ #define OZClassPart0001000002fffffd_0_in_00010000020002a1 1 #define OZClassPart0001000002fffffe_0_in_00010000020002a1 1 #define OZClassPart00010000020002a1_0_in_00010000020002a1 0 #define OZClassPart000000000000...
#include "tests.h" extern MunitSuite common_format_suite; extern MunitSuite common_utils_suite; extern MunitSuite common_macho_suite; extern MunitSuite mach_print_suite; extern MunitSuite common_fat_suite; extern MunitSuite otool_suite; static MunitSuite test_suites = { //{ name, tests, suites, iterations, options }...
#include "main.h" void search(slist *head, data_t *string) { slist *temp = head; slist_file_table *temp1; while(temp) { if(strcmp(temp->word, string) == 0) { temp1 = temp->file_table; printf("\nstring : %s present %d files\n", temp->word, temp->file_count); while(temp1) { printf("FILE: presen...
#include <stdio.h> #include <stdlib.h> typedef struct Node{ int data; struct Node *next; } Node; Node *headNode = NULL; int nodeCounter = 0; Node* nodeInit() { headNode = (struct Node*) malloc(sizeof(struct Node)); headNode->data = 0; headNode->next = NULL; } int get(int index) { Node *curr = headNode; int c...
//--Author DI Glazier 30/06/2014 //--Rev //--Update //--Description //HASPECT Event Reconstruction //THSHisto //Facilitates histogram declaration and filling //Users must implement : //HistogramList to declare which types of histogram they need //FillHistogram to fill the histogram with datamembers of their select...
/* * Copyright (C) 2020 Erik Fleckstein <erik@tinkerforge.com> * * Redistribution and use in source and binary forms of this file, * with or without modification, are permitted. See the Creative * Commons Zero (CC0 1.0) License for more details. */ #include <errno.h> #include <stdarg.h> #include <stdlib.h> #incl...
/* -------------------------------------------------------------------------------------------- \name ECalLiCtrlShutDown \brief Shut-down the ECAL LI controller \author Costas Andreopoulos <costas.andreopoulos \at stfc.ac.uk> STFC, Rutherford Appleton Lab. \date 06/05/2008 ------------------------------...
#include <stdio.h> int main (void) { int sum = 25 + 50; printf("The sum of 50 and 25 is %i.\n", sum); return 0; }
*/ /* classes used for instanciation /* classes used for invoke */ #ifndef _OZ0001000002000592P_H_ #define _OZ0001000002000592P_H_ static OZ_ExceptionIDRec OZ_0001000002000592_ElementNotFound = {0x0001000002000592LL, 0}; static OZ_ExceptionIDRec OZ_0001000002000592_Empty = {0x0001000002000592LL, 1}; static OZ_Except...
#include "fasta.h" #include <stdlib.h> #include <string.h> char *read_sequence(FILE *fd, long max_len) { // read first sequence from file descriptor char *seq = calloc(max_len, sizeof(char)); if (seq == NULL) { fprintf(stderr, "Allocation failed\n"); exit(1); } long seq_len = 0; while (fgets(seq + ...
#include <stdio.h> #include <stdlib.h> int main(int argc, char** argv) { FILE *fp; int i; fp = fopen(argv[1], "r"); while(fgetc(fp) != EOF) { fseek(fp, -1, SEEK_CUR); fscanf(fp, "%x\n", &i); printf("%i\n", i); } return 0; }
#ifndef NITRO_CARD_BACKUP_H_ #define NITRO_CARD_BACKUP_H_ #include "nitro/types.h" BOOL CARD_TryWaitBackupAsync(void); #endif //NITRO_CARD_BACKUP_H_
/********************************************************************** ISA 8 bit Floppy Disk Controller **********************************************************************/ #include "emu.h" #include "machine/isa_fdc.h" #include "machine/pc_fdc.h" #include "imagedev/flopdrv.h" #include "formats/pc_dsk.h" #inc...
#include<stdio.h> #include<pthread.h> #include<semaphore.h> #include<stdlib.h> #include<unistd.h> #include <sys/ipc.h> #include <sys/shm.h> #define COUNT 5 //for controlling access sem_t read_protect; sem_t write_protect; sem_t item_protect; int item=0; // to keep track int write_waiting=0; int read_waiting=0; ...
struct TrieNode { TrieNode* child; size_t childNum; char key; } struct TrieTree;
/* popser.c - the POP service */ #include "../h/mh.h" #include "../h/dropsbr.h" #include "../zotnet/bboards.h" #include <stdio.h> #include "../zotnet/mts.h" #include <ctype.h> #include <errno.h> #include <pwd.h> #include <signal.h> #include <syslog.h> #include <sys/types.h> #include <sys/stat.h> #define TRUE 1 #defi...
#ifndef __JSTL_H #define __JSTL_H #include "JSArray.h" #include "PtrArray.h" #include "JSSet.h" #include "JSMap.h" #endif // __JSTL_H
/** @file s22h/unicode.h @author s22h @date 7 Jan 2019 @brief A header-only library for Unicode handling @version 0.1.2 Code review of initial version provided by StackExchange members: https://codereview.stackexchange.com/questions/197548/convert-utf8-string-to-utf32-string-in-c chux: https://codereview.sta...