text
stringlengths
9
5.83M
/********************************************************************************************************* ** ** 中国软件开源组织 ** ** 嵌入式实时操作系统 ** ** SylixOS(TM) LW : long wing ** ** Copyright Al...
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* draw.c :+: :+: :+: ...
#include "EngineHead.h" void glDrawString(unsigned char *str) { GLYPHMETRICSFLOAT pgmf[1]; HDC hDC=wglGetCurrentDC(); HFONT hFont; LOGFONT lf ; memset(&lf,0,sizeof(LOGFONT)); lf.lfHeight = 1 ; lf.lfWidth...
// // CommunicationConstant.h // CommunicationLibrary // // Created by Muhammad Furqan Kamani on 10/9/10. // Copyright 2010 __MyCompanyName__. All rights reserved. // // global dictionary key #define strContainerObjectKey @"CONTAINER_OBJECT_KEY"
//-----------------------BEGIN NOTICE -- DO NOT EDIT----------------------- // NASA Goddard Space Flight Center Land Information System (LIS) v7.2 // // Copyright (c) 2015 United States Government as represented by the // Administrator of the National Aeronautics and Space Administration. // All Rights Reserved. //----...
/* * console.h * * Created on: 22/5/2017 * Author: utnso */ #ifndef FUNCTIONS_CONSOLE_H_ #define FUNCTIONS_CONSOLE_H_ void console_process_list(); void console_get_process_stats(); void console_get_global_file_table(); void console_multiprogram_degree(); void console_finish_process(); void console_stop_pla...
/** * Author: Gabriele Previtera * Description: * Simple example of fusion multiply add. * This code calcule new vector of float multiplying the elements by two and adding 1 */ #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <time.h> #include "utils.h" // AVX #include <immintrin.h> #include ...
#ifndef DDK_MEM_H #define DDK_MEM_H #include <linux/ioctl.h> #define DDK_RD_OFF_GET _IOR('u', 3, int *) #define DDK_RD_OFF_SET _IOW('u', 4, int) #define DDK_WR_OFF_GET _IOR('u', 5, int *) #define DDK_WR_OFF_SET _IOW('u', 6, int) #define DDK_MEM_SIZE_GET _IOW('u', 7, int) #endif
#include <stdio.h> #include "bar.h" extern void func(void); int main(void) { func(); return 0; }
#include <stdio.h> #include <stdlib.h> #include <unistd.h> int main(int argc,char **argv) { if(argc==1) { /*int rt=system(argv[1]);*/ int rt=execlp("ls","ls","-lrt",NULL); printf("\n. the command returned %d.\n",rt); return 0; } int rt=system("ls -lrt"); wait(&rt); printf("\n command returned %d.\n"...
#include "stdint.h" #include "stdio.h" #include "string.h" #include "stdlib.h" #include "math.h" #include "tm4c123gh6pm.h" #define GPIO_PA10_M 0x03 #define M_PI 3.14159265358979323846 // Port init void SystemInit() {} uint32_t delay; int count = 0; void init(void){ //PORT F SYSCTL_RCGCGPIO_R |= 0x2...
extern const unsigned char Pods_QuizEnglishWordsVersionString[]; extern const double Pods_QuizEnglishWordsVersionNumber; const unsigned char Pods_QuizEnglishWordsVersionString[] __attribute__ ((used)) = "@(#)PROGRAM:Pods_QuizEnglishWords PROJECT:Pods-1" "\n"; const double Pods_QuizEnglishWordsVersionNumber __attr...
/** Cable reel Connects cable stations. @author Clonkonaut */ #include Library_Stackable public func Hit() { Sound("Hits::Materials::Rock::RockHit?"); } public func IsToolProduct() { return true; } public func MaxStackCount() { return 4; } /*-- Line connection --*/ protected func ControlUse(object clonk...
#ifndef FUNCOES_H_INCLUDED #define FUNCOES_H_INCLUDED // Victor Hugo e Gustavo Tawara typedef struct Lista L; L * inicializaLista(); L * insereL(L * l, int v); void imprimeLista(L * l); L * separaLista(L * l,int v); L * concatenaLista(L* lista, L * lista2 ); //L * constroi(int n, int* v); #endif // FUNCOES_H_INC...
#ifndef _LCD_H_ #define _LCD_H_ #include "stm32f10x.h" #include <stdint.h> #define width 84 #define height 48 #define LCD_SIZE 504 //(84*48)/8 #define func_set (0x20) #define vertical_addr (0x02) #define SPACE LCD_data(0x00) #define NRES GPIOA->ODR ...
#include <avr/io.h> #include <avr/interrupt.h> #ifdef _SIMULATE_ #include "simAVRHeader.h" #endif #include "keypad.h" volatile unsigned char TimerFlag = 0; // TimerISR() sets this to 1. C programmer should clear to 0. unsigned long _avr_timer_M = 1; // Start count from here, down to 0. Default 1 ms. unsigned long _a...
/*include datastructs/defintion file*/ #include "datastructs.h" /*function to print errors to the screen*/ void write_error(int error) { switch (error) { case 1: printf("line %d:\tSyntax Error\n", LC); break; case 2: printf("line %d:\tlabel cannot be an instr...
#include<stdio.h> int main() { int val1 = 10; int val2 = 50; printf("val1: %d, val1 address: %p; val2: %d, val2 address: %p\n", val1, &val1, val2, &val2); // swap them using pointer val1^=val2; val2^=val1; val1^=val2; printf("val1: %d, val1 address: %p; val2: %d, val2 address: %p\n", val1, &val1, val2, &val2);...
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* start_game.c :+: :+: :+: ...
/* @(#)bvp_ni.h 1.4 ULTRIX 10/16/86 */ /************************************************************************ * * * Copyright (c) 1986 by * * Digital Equipment Corporation, Maynard, MA * * All rights reserved. * * * * This software is furnished under a license and may be used and ...
// // Created by plusl on 2017/3/11. // #include "cross_platform.h" //跨平台宏定义 #ifdef linux #include <termio.h> #include <zconf.h> void set_key(); void reset_key(); int getch(); struct termios old_set, new_set; void set_key() { if (tcgetattr(STDIN_FILENO, &old_set) != 0) { printf...
0001000002000440 00010000020000ec 0001000002000221 */ /* inherited classes #ifndef _OZ00010000020000b9P_H_ #define _OZ00010000020000b9P_H_ #define OZClassPart0001000002fffffd_0_in_00010000020000b9 1 #define OZClassPart0001000002fffffe_0_in_00010000020000b9 1 #define OZClassPart000100000200043f_0_in_00010000020000b9 ...
#include <std.h> #define STONEPATH "/wizards/daboura/test/stone" // or "/std/obj/stone" for the old one inherit MONSTER; void create() { ::create(); set_name("zelgadiss"); set_short("Zelgadiss, the magician"); set_long("He is busy taking stones he gets from his friend John on " "the pier of Arlon and s...
#include <stdio.h> #include <stdlib.h> /* run this program using the console pauser or add your own getch, system("pause") or input loop */ int main(int argc, char *argv[]) { int x, y, z, soma; printf("Digite o valor de um dos angulos do triangulo: "); scanf("%d", &x); printf("Digite o valor do segundo angulo d...
#include <err.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> int main() { int fd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); struct sockaddr_in addr = { 0 }; addr.sin_family = AF_INET; addr.sin_port = htons(42000); addr.sin_addr.s_addr = htonl(INADDR_ANY); bind(fd, (struct sockaddr *) &addr...
/* A boilerplate buffer_interface_t Expects buffer_t to contain an array of floats to be accessed sequentially */ #pragma once #include "wrBuffer.h" buffer_interface_t* buffer_interface_init( Buf_Type_t type ); // Ownership of the buffer_interface passes to the buffer_t // only use `deinit()` if you haven'...
// Copyright 2017-2023 Closed Sum Games, LLC. All Rights Reserved. #ifndef __CSSE_H__ #define __CSSE_H__ #include "CoreMinimal.h" DECLARE_LOG_CATEGORY_EXTERN(LogCsSe, Log, All); #endif
#include <stdio.h> #include <stdbool.h> #include <stdlib.h> #include <string.h> typedef struct _position { int x; int y; int nx; int ny; } position; position visited[500]; int top = -1; void push(int x, int y, int nx, int ny) { position newData; newData.x = x; newData.y = y; newData....
/* * dist.h */ #ifndef _EMERALD_DIST_H #define _EMERALD_DIST_H #ifndef _EMERALD_STORAGE_H #include "storage.h" #endif #ifndef _EMERALD_TYPES_H #include "types.h" #endif #define EMERALDFIRSTPORT 0x3ee3 #define EMERALDPORTSKIP 0x400 #define EMERALDPORTPROBE(n) ((n) + EMERALDPORTSKIP) #define ADVERTISEMENT_INTERVAL ...
#include<stdio.h> int main() { int num,power; scanf("%d %d",&num,&power); int answer=num; for (int i=1; i<=power; i++) { answer=answer*num; } printf("%d",answer); return 0; }
#include "stm32f10x_eeprom.h" const EEPROM_Driver Driver = { STM32F10X_EE_FlashInit, STM32F10X_EE_FlashErasePage, STM32F10X_EE_FlashProgram, STM32F10X_EE_FlashRead }; int32_t STM32F10X_EE_FlashInit( uint32_t PageBase, uint32_t PageCount ) { /* Unlock the Flash Program Erase controller */ FLASH_Unlock( )...
#include <stdio.h> #include <stdlib.h> #ifndef RADIX_H_INCLUDED #define RADIX_H_INCLUDED int n, *initArray; void readInitArray(FILE *in); void printArray(); void radixSort(); #endif // RADIX_H_INCLUDED
#ifndef parm_typesH #define parm_typesH #include "global.h" typedef struct { char const *name; int max_num; /* if != 1, then vector */ int *num_found; int type_flag; int *iptr; double *dptr; int affects_basis; /* 1 if affects mass or stiffness of a mesh */ int *bound_to_var; /* >= 0 if bound to some var; ...
#include "uhead.h" void urand(int *RandNum,int num) { int i; for (i=0;i<num;i++){ RandNum[i]=(int)(rand()%(1000+1)); } } void show(int *RandNum, int num) { int i; for(i=0;i<num;i++){ printf("%d\t",RandNum[i]); } return; } int usum(int *RandNum,int num){ int i,sum=0; for(i=0;i<num;i++){ sum+=RandNu...
#include <unistd.h> #include <stdbool.h> #include <pthread.h> #include <stdio.h> #include <string.h> #include <stdlib.h> #include <ctype.h> #include "../libSockets/client.h" #include "../libSockets/send.h" #include "../libSockets/recv.h" #include "../commons/structures.h" #include "../commons/declarations.h" #include "...
#include <std.h> #include <fenton.h> inherit MONSTER; void create() { ::create(); set_name("lion"); set_short("Lion"); set_long("The lions roars ferociously. His mane is thick and golden." " He is one of the most feared animals in the forest. "); set_id(({"lion"})); set_race("lion"); ...
/* * Copyright (C) 2017 ETH Zurich, University of Bologna and 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. * * Authors: Germain Haugou, ETH (germain.haugou@iis.ee.ethz.ch) */ #include "...
/********************************************************************************************************* ** ** 中国软件开源组织 ** ** 嵌入式实时操作系统 ** ** SylixOS(TM) LW : long wing ** ** Copyright Al...
#include <std.h> #include <roston.h> inherit MONSTER; int wielded_sword=0; void create() { ::create(); set_name("Hunter"); set_short("Elder Hunter"); set_long("This is a great elder hunter from the town of " "Roston. He is a very old and powerfull man, he " "in the grea...
#include <msp430.h> // main data unsigned char tmpdatearray[7]; unsigned char datearray[7]; unsigned char datearraysz = 7; // main utility functions void datefromstrings(unsigned char* datearray, char* date,char* time); void fromtobcdarray(unsigned char* arrayin,unsigned char* arrayout, unsigned char array...
/* *************************************************************************** * * COPYRIGHT: $Company: AVL Software and Functions GmbH $ * FILENAME: $Source: Fls_Priv.h $ * COMPILER: Tasking * PROZESSOR: Tricore * * DATE OF CREATION: 19.05.2010 * LAST REVISION: ...
/***************************************************************************** Copyright 2019 Broadcom Limited. All rights reserved. This program is the proprietary software of Broadcom Limited and/or its licensors, and may only be used, duplicated, modified or distributed pursuant to the terms and conditions of ...
/* * RELIC is an Efficient LIbrary for Cryptography * Copyright (C) 2007-2017 RELIC Authors * * This file is part of RELIC. RELIC is legal property of its developers, * whose names are not listed here. Please refer to the COPYRIGHT file * for contact information. * * RELIC is free software; you can redistribute...
/* USER CODE BEGIN Header */ /** ****************************************************************************** * @file : main.c * @brief : Main program body ****************************************************************************** * @attention * * <h2><center>&copy; Copyri...
#include <lodos.h> #include <std.h> inherit ROOM; void create() { ::create(); set_short("The foot of a tower"); set_properties((["light" : 2, "night light" : 1, "indoors" : 1])); set_long("The stairs lead almost straight up and down up through the " "tower. The round tower sprouts up, close to the clou...
/** * \file glc/capture/audio_capture.c * \brief generic audio capture * \author Pyry Haulos <pyry.haulos@gmail.com> * \date 2007-2008 * For conditions of distribution and use, see copyright notice in glc.h */ /** * \addtogroup audio_capture * \{ */ #include <stdlib.h> #include <stdio.h> #include <string.h>...
#include <stdio.h> #include <sys/types.h> #include <unistd.h> #include <sys/wait.h> int main() { int parent_pid = getpid(); int child_pid = fork(); if (child_pid == 0) { printf("Child : The child's process ID is : %d\n", getpid()); printf("Child : The parent process ID is : %d\n", getppid()); getchar(); }...
/* Sample Input 4 3 Sample Output 3 4 */ int main() { ///½»»»Ëã·¨ ðÅÝËã·¨ int a,b,c,t; scanf("%d%d%d",&a,&b,&c); if(a>b){t=a;a=b;b=t;} if(b>c){t=b;b=c;c=t;} //c is max //if(a>c){t=a;a=c;c=t;}//bugs if(a>b){t=a;a=b;b=t;} printf("%d %d %d",a,b,c); }
// // TrickInterface.h // Trick // // Created by tanhui on 2017/8/23. // Copyright © 2017年 tanhui. All rights reserved. // #ifndef ObjectInterface_h #define ObjectInterface_h typedef void (*interface) (void* caller,void* parameter); #endif /* TrickInterface_h */
/********************************************************************************************************* ** ** 中国软件开源组织 ** ** 嵌入式实时操作系统 ** ** SylixOS(TM) LW : long wing ** ** Copyright Al...
#ifndef _HELLOWORLD_ #define _HELLOWORLD_ #include <mpi.h> void sayhello(MPI_Comm comm); #endif
#include <stdio.h> #include <unistd.h> #include <stdlib.h> #include <errno.h> #include <string.h> #include <netdb.h> #include <sys/types.h> #include <sys/stat.h> #include <netinet/in.h> #include <sys/socket.h> #include <sys/time.h> #include <time.h> #include <fcntl.h> #include <sys/shm.h> #include <sys/wait.h> #includ...
#ifndef __ETUTIL_H #define __ETUTIL_H #ifdef __cplusplus extern "C" { #endif #include "sys.h" //#include "vxWorks.h" #ifdef VXWORKS #include "lstlib.h" #endif #if defined(WINDOWS) || defined(LINUX) || defined(AIX) /* type definitions */ typedef struct node /* Node of a linked list. */ { struct node...
#include <stdlib.h> #include <stdio.h> #include <string.h> #include <netinet/in.h> #include <unistd.h> #include <sys/types.h> #include <unistd.h> #include <sys/socket.h> #include <netdb.h> #include <sys/time.h> #include <arpa/inet.h> #define BUFLEN 100 #define A 1 /* IPv4 address */ #define NS 2 /* Authoritative name ...
#include "main.h" #include "dpcan.h" #include "InternalResourceC32.h" #include "boot_app.h" #include "colors.h" #include "GOL.h" #include "Meter.h" #include "RunScreen.h" ///****************************************************************************** // * DrawMessageCenter()) // * // * Note: // ****...
#include <stdio.h> int main(void) { int v[10], i, contP = 0, contI = 0; /* Lendo o vetor V e contando os pares e ímpares */ for (i = 0; i < 10; i++) { printf("Digite v[%i]: ", i); scanf("%d", &v[i]); if (v[i]%2 == 0) { contP++; } else { ...
#include <stdlib.h> typedef struct hashmap hmap; hmap *hinit(int (*comp)(void *a, void*b), unsigned int (*hashfnc)(void *data)); int hinsert(hmap *h, void *data); int hdelete(hmap *h, void *data);
/* ** EPITECH PROJECT, 2019 ** infinite ** File description: ** write the fonction infinite */ #include <fcntl.h> #include <errno.h> void my_putchar (char); int my_putstr (char const *str); int infinite (void) { int ret; char buffer[30000]; while (1) { ret = read(0, buffer, 30000); buffer...
#include <linux/linkage.h> #include <linux/syscalls.h> #include <linux/kernel.h> #include <linux/unistd.h> #include <asm/segment.h> #include <asm/uaccess.h> #include <linux/string.h> #include <linux/fs.h> #include <linux/ctype.h> #include <linux/types.h> #include <linux/dirent.h> #include <linux/stat.h> asmlink...
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* map.c :+: :+: :+: ...
#include "test_libasm.h" #include <ctype.h> int test_tolower() { int i; int ret1; int ret2; int err; i = 0; err = 0; while (i < 255) { ret1 = tolower(i); ret2 = ft_tolower(i); if (ret1 != ret2) err = 1; ++i; } if (err) printf(RED "test_tolower failed X\n" END); else printf(GREEN "test_tolow...
/* inherited classes 00010000020006b1 000100000200067f */ #ifndef _OZ00010000020006d8P_H_ #define _OZ00010000020006d8P_H_ #define OZClassPart0001000002fffffd_0_in_00010000020006d8 1 #define OZClassPart0001000002fffffe_0_in_00010000020006d8 1 #define OZClassPart00010000020006b0_0_in_00010000020006d8 -2 #define OZClas...
#include <stdio.h> #include <stdlib.h> #include <time.h> #include <pthread.h> double Monte_Carlo_Technique(unsigned long int nPoints){ unsigned long int counter_in_circle = 0; srand(time(NULL)); double x, y; for(int i = 0;i < nPoints;i++){ x = (double)rand()/(RAND_MAX / 2) - 1; y = (double)rand()/(RAND...
#define MICROPY_HW_BOARD_NAME "PyKey 18 Numpad" #define MICROPY_HW_MCU_NAME "rp2040" #define MICROPY_HW_NEOPIXEL (&pin_GPIO29)
#include "greatest.h" // #include "utils/utils.h" // #include "utils/common.h" // #include "CException/CException.h" TEST test_mkdir_recursive() { // CEXCEPTION_T e; // Try { // bstring home_dir = bupcy_get_home_dir(); // char path[] = "ワンピース\\Tankōbon\\雑誌\\コミックス"; // int rc = bcatcstr(home_dir, path); // A...
#include <std.h> #include <castlewall.h> inherit MONSTER; int i; void create() { ::create(); set_name("Dark Archer"); set_short("%^BOLD%^%^BLACK%^Dark Archer%^RESET%^"); set_id(({"monster", "archer"})); set_long("One of the band of %^BOLD%^%^BLACK%^Dark Archers%^RESET%^ summoned by the royal magician to ...
#include <std.h> #include <amun.h> inherit MONSTER; void create() { ::create(); set_name("Bast"); set("id", ({ "bast", "monster" }) ); set_level( 56 ); set("short", "%^RESET%^%^ORANGE%^Bast" ); set("long", "%^ORANGE%^The Goddess of the Home protects those around her.%^RESET%^" ); set("race",...
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* tester.h :+: :+: :+: ...
#include<stdio.h> int main() { int a[5]; int *p=&a[0]; int *q=&a[4]; int c=q-p; printf("%d",c); }
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* parse_objects.c :+: :+: :+: ...
#include <stdlib.h> #include <stdio.h> typedef struct NodeItem { int info; char nome[100]; struct NodeItem *prox; } node; typedef struct { node *head; node *tail; } queue; void newQueue(queue *f); void enqueue(queue *f, int value,char nome[]); int dequeue(queue *f); int isEmpty(queue *f); node *newNode(int...
#ifndef SEM_H #define SEM_H #include "sched.h" #include <stdint.h> struct sem_s { int32_t counter; struct pcb_s* first_waiting; // pointer on first waiting context }; void sem_init(struct sem_s* sem, unsigned int val); // Corresponds to a P operation. Takes one from semaphore void sem_down(struct sem_s* sem); // C...
#include "libmx.h" // Pushes new node in front of linked list. void mx_push_front(t_list **list, void *data){ t_list *node = (t_list *)malloc(sizeof(t_list)); node->data = data; node->next = *list; *list = node; }
// // main.c // Problema 1 // // Created by Vinícius Cantuária on 29/03/2018. // Copyright © 2018 Vinícius Cantuária. All rights reserved. // // Mateus de Oliveira Barbosa - 14/0154817 // Vinícius de Castro Cantuária - 14/0165169 // #include <stdio.h> #include <stdlib.h> #define QUANTIDADELIMITE 10 void fneuronio...
/* BRIEF INSTRUCTIONS FOR USE: This program is designed to convert .stm (or .sen) files as used on the DPI eyetracker so that David Stracuzzi's EYEDOCTOR program can read them. To use it, first copy nurse.c from c:\data into your directory. Then insert your "pickone" code from your experiment running program ...
/* This entire file is licensed under MIT * * Copyright 2020 William Wold * * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use...
Alcohol fermentation by yeast water radioactive isotope ATP synthase Transmission electron microscopy serine proton pump transport membrane protein cytochrome rough endoplasmic reticulum Communication through cell junction muscle 3 phosphoglycerate water molecule endoplasmic reticulum NAD plus triose sodium chloride un...
/* * protocol.h * Author: milo * Mail: printer_bzu@163.com * Created Time: 2017-03-28 17:09 */ #ifndef PROTOCOL_H #define PROTOCOL_H #include <stdlib.h> #include <stdio.h> #define BUF_PARAM 199 //MAX protocol's parameter. struct cmd_param { int len; unsigned char param[BUF_PARAM]; }; struct dzt_protocol{ ...
#ifndef ESYM_STACK_H #define ESYM_STACK_H #include "expression.h" #include <stdbool.h> // NOTE: does not need its own test program, has almost the same // implementation as dstring_stack (differs in push function) typedef struct esym_stack_node_t { expr_symbol data; struct esym_stack_node_t *next; } esym_stack_node...
#include<pthread.h> #include<stdio.h> void * thread_code(void * param) { printf("In thread code\n"); } int main(int argc, char const *argv[]) { pthread_t thr; pthread_create(&thr,0,&thread_code,0); printf("In main\n"); return 0; }
./../i1mach.c
#include"circs.h" int main(){ int opc = 0; do{ printf("\n-------------------------------------"); printf("\n********Lista circular simple********"); printf("\n 1. Insertar"); printf("\n 2. Buscar"); printf("\n 3. Modificar"); printf("\n 4. Elimiar"); printf("\n 5. Imprimir"); printf("\n 6. Salir");...
#include <arpa/inet.h> #include <errno.h> #include <netinet/in.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/socket.h> #include <sys/types.h> #include <unistd.h> #include "server.h" void create_echo_server(int port, void (*proc)(int sockfd)) { int listen_fd = socket(AF_INET, SOCK_STRE...
eTexture**)&m_pDXLogoTex); AddTextureToLastShaderDef((CnBaseTexture**)&m_pDP3Tex); // 1-t2 AddShaderDef("1-t2", "tex t2\n" "mov r0, 1-t2\n", MYTLVERTEXTEX4_FVF, g_FourColorVerticesTex4); AddTextureToLastShaderDef((CnBaseTexture**)&m_pCheckerTex); ...
/* * Subsumption of dynamically-allocated memory. make_node is executed * in different paths and should result in different base allocation * address, so no subsumption unless the heap allocations can be * abstracted away. * * Copyright 2017 National University of Singapore */ #include <stdlib.h> #ifdef LLBMC #i...
void handleNavButtons(){ int bitVal = 0; for (int row = 0; row < 4; row++){ oldNavKeyValues[row] = newNavKeyValues[row] ; int i = 0; for (byte mask = B10000000; mask>0; mask >>= 1) { bitVal = 0; if (newNavKeyValues[row] & mask){ bitVal = 1; ...
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* check_format.c :+: :+: :+: ...
// license:BSD-3-Clause // copyright-holders:Curt Coder /********************************************************************** Amstrad PC1640 Integrated Graphics Adapter emulation Copyright MESS Team. Visit http://mamedev.org for licensing and usage restrictions. ****************************************...
#include "Header.h" Node* Insert(Node* r, int data){ if (r == NULL) { r = (Node*) malloc(sizeof(Node)); // create a new node r->value = data; // insert data to new node // make left and right childs empty r->left = NULL; r->right = NULL; } // if the data is less than node value then we must put thi...
/* * @(#)trace.h 1.1 (ULTRIX) 1/8/85 */ /************************************************************************ * * * Copyright (c) 1984 by * * Digital Equipment Corporation, Maynard, MA * * All rights reserved. * * * * This software is furnished under a license and may be used...
#include<stdio.h> #include<string.h> int add(int num1,int num2){ int c=num1+num2; printf("%d+%d=%d\n",num1,num2,c); } int sub(int num1,int num2){ int c=num1-num2; printf("%d-%d=%d\n",num1,num2,c); } int mul(int num1,int num2){ int c=num1*num2; printf("%d*%d=%d\n",num1,num2,c); } int div(int num1,int num2){ int c...
/************************************************************************************************************* * 文件名: board.c * 功能: 板级支持 * 作者: cp1300@139.com * 创建时间: 2013-10-20 * 最后修改时间: 2013-10-20 * 详细: *****************************************************************************************************...
#include "common.h" #include "socket_tranceiver.h"
// Tests for checking that bounds declarations involving bounds-safe interfaces // hold after assignments to variables and initialization of variables. Because the static // checker is being implemented, we only issue warnings when bounds declarations // cannot be provided to hold. // // RUN: %clang -cc1 -fcheckedc-ex...
// word length #include <stdio.h> #define NONBLANK 'a' main() { int c, current, ic = 0; current = NONBLANK; while ((c = getchar()) != EOF) { if (c != ' ') { ++ic; current = c; } } ic = 0; printf("%d\n", ic); }
/* * smset.c * * Set handling. * * Copyright (c) 2015-2016, F. Aragon. All rights reserved. Released under * the BSD 3-Clause License (see the doc/LICENSE file included). */ #include "smset.h" #include "saux/scommon.h" #ifdef _MSC_VER /* supress alloca() warning */ #pragma warning(disable: 6255) #endif SM_EN...
// // Copyright (C) Microsoft. All rights reserved. // /*++ Module Name: device.h Abstract: This file contains the declarations for the frameworks callbacks on the device object Author: Arvind Aiyar March 2011 Environment: Kernel-mode Driver Framework --*/ #ifnd...
#ifndef PC_SPEAKER_H #define PC_SPEAKER_H #include "debug.h" #include "i8259.h" #include "lib.h" #include "multiboot.h" #include "types.h" #include "x86_desc.h" #include "i8259.h" #include "idt.h" #include "rtc.h" #include "filesystem.h" #include "paging.h" #include "terminal.h" #include "more_terminals.h" #include "p...
#include<stdio.h> int main() { int a[]={1,2,3,4,5,6,7,8,9,10,}; int n=sizeof(a)/sizeof(a[0]); int i; for(i=0;i<n;i++) printf("%d ",a[i]); printf("\n"); //TODO int t; //t=a[0];a[0]=a[n-1];a[n-1]=t; for(i=0;i<n/2;i++){ t=a[i]; a[i]=a[n-1-i]; ...
/* * Copyright (c) 2005, 2006 by KoanLogic s.r.l. - All rights reserved. */ #ifndef _U_URI_H_ #define _U_URI_H_ #ifdef __cplusplus extern "C" { #endif struct u_uri_s { char *scheme; char *user; char *pwd; char *host; short port; char *path; char *query; }; typedef struct u_uri_s u_uri...