text
stringlengths
3.08k
10.5k
// HEADER FOR LIST PROCESSING PACKAGE DAT 23/11/79 //---------------------------------------------------------------------- //The KRC system is Copyright (c) <NAME> 1981 //All rights reserved. It is distributed as free software under the //terms in the file "COPYING", which is included in the distribution. //--...
/* * Filename: nim_ROBINS.c * Path: /mnt/usb/uni/e2i/prog/TP3 * Last Modified Date: Monday, November 4th 2019, 8:06:59 pm * Author: <NAME> */ #include <stdio.h> #include <stdlib.h> #include <time.h> // Initialise les paramètres du jeu selon les valeurs fournies par l'utilisateur void initialiser(int *nbCa, int *...
/* * sentinal.h * * Copyright (c) 2021, 2022 jjb * All rights reserved. * * This source code is licensed under the MIT license found * in the root directory of this source tree. */ #ifndef _SYS_TYPES_H # include <sys/types.h> #endif #ifndef PCRE2_H_IDEMPOTENT_GUARD # define PCRE2_CODE_UNIT_WIDTH 8 # include <...
/* An interpreter for the 1L_a language. This program is in the public domain. It may be used, modified, copied, distributed, sold, and otherwise exploited without restriction. Last modified: Fri Oct 28 10:42:59 EDT 2005 Fixed an input bug in inbit(). <EMAIL> */ #include <stdio.h> #include <stdlib.h> #include <str...
// Simple fan control utility for MSI WIND / LG X110 Netbooks on Linux // by <NAME> (<EMAIL>) // Based on LGXfan created by <NAME> (<EMAIL>) // Compile: "cc kb3700_fanctrl.c -o kb3700_fanctrl" // Run as root. #include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/io.h> #in...
/* * Copyright (C) 2008-2020 Advanced Micro Devices, Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * 1. Redistributions of source code must retain the above copyright notice, * this ...
#include <stdlib.h> #include <stdio.h> #include "cards.h" #include "deck.h" #include "eval.h" void test_card_ptr_comp() { int const nCards = 52; card_t cards[nCards]; for (int i = 0; i < nCards; i++) { card_t refCard = card_from_num(i); cards[i] = refCard; } card_t * cards_p[nCards]; for (int i = 0; i < n...
/* ======================================================================== * Copyright 1988-2006 University of Washington * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http:...
/* Samba Unix/Linux SMB client library net time command Copyright (C) 2001 <NAME> (<EMAIL>) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or ...
// Vector Math Functions // OpenGL SuperBible gltools library // <NAME>. // One note of interest. These REALLY should be inlined. I'm sorry I was too stupid at the time // to figure out how to get inlining to work on all the platforms and different compilers I use. // this seemed simpler than a ton of #ifdef's all over...
#include "globals.h" #include "hardware/keyboard.h" #include "hardware/24lc512.h" #include "hardware/ds1307.h" #include "hardware/rfm12.h" #include "hardware/lcd.h" #include "messages.h" #include "menu.h" #include "event.h" volatile uint8_t active_call_id[N_ACTIVE_CALL_MAX], n_active_calls; volatile uint16_t nbuttons...
/* * GccApplication1.c * * Created: 12.03.2020 23:06:29 * Author : Test */ #define F_CPU 1000000UL #define LED (1 << PB0) #include <avr/io.h> #include <util/delay.h> #include <avr/interrupt.h> #include <avr/eeprom.h> #include <stdlib.h> #include <stdio.h> #include <string.h> #include <math.h> #include "HD44780...
/************************************************************************************************** Target Hardware: PIC24Fxxxx Code assumptions: Purpose: Notes: Version History: vnext Y-M-D <NAME> Compiler: C30 v3.31 Optimization: 0 IDE: MPLABx 1.95 Tool: RealICE Computer: Intel Xeon CPU 3.07 GHz, 6 GB RAM, Windows ...
#include "snapconfig.h" /* Routines to print a description of the coordinate system to a file */ /* $Log: crdsysc4.c,v $ Revision 1.2 2003/11/28 01:59:25 ccrook Updated to be able to use grid transformation for datum changes (ie to support official NZGD49-NZGD2000 conversion) Revision 1.1 1995/12/22...
/** * Behavior for bhvTTCMovingBar. */ /** * The delay before each cycle on each setting. On random setting, this is * overwritten with one of the below delays after the first cycle. */ static s16 sTTCMovingBarDelays[] = { /* TTC_SPEED_SLOW */ 55, /* TTC_SPEED_FAST */ 30, /* TTC_SPEED_RANDOM *...
#include <stdio.h> #include <pthread.h> #include <unistd.h> #include "ite/itp.h" /* This example is to print the answer of variables */ void test_printf() { int a,b; float c,d; a = 15; b = a / 2; printf("%d\n",b); printf("%3d\n",b); printf("%03d\n",b); c = 15.3; d = c / 3; p...
/* * rfc931() speaks a common subset of the RFC 931, AUTH, TAP and IDENT * protocols. The code queries an RFC 931 etc. compatible daemon on a remote * host to look up the owner of a connection. The information should not be * used for authentication purposes. This routine intercepts alarm signals. * * Dia...
#include <u.h> #include <libc.h> #include <draw.h> #include <event.h> #include <panel.h> #include "pldefs.h" #include <keyboard.h> typedef struct Entry Entry; struct Entry{ char *entry; char *entp; char *eent; void (*hit)(Panel *, char *); Point minsize; }; #define SLACK 7 /* enough for one extra rune and ◀ and a...
#include "graphics.h" #include "functions.h" void render(SDL_Surface* main, SDL_Surface* map, SDL_Surface* borders, List* capitals, bool isGenerated) { // Heightmap SDL_BlitSurface(map, NULL, main, NULL); // Borders if (isGenerated) { SDL_BlitSurface(borders, NULL, main, NULL); } // Capitals for (List* i...
/* Show Mup Allocation Debugging Information * This program reads a Mup allocdebug file and prints it in * a human readable format. * * Some day, this could potentially look up the addresses where the * allocs/frees were called from, and print them symbolically. * For now, the user has to deduce the locations ...
#include <stdarg.h> #include <stddef.h> #include <setjmp.h> #include <stdint.h> #include <stdbool.h> #include <string.h> #include <cmocka.h> #include "common/format.h" static void test_format_timestamp(void **state) { (void) state; char out[20] = {0}; // return false if not enough space to handle outpu...
#include "RTL/Host/tilek-rtl.h" #include "KLT/RTL/kernel.h" #include "KLT/RTL/loop.h" #include "KLT/RTL/tile.h" #include "KLT/RTL/data.h" #include "KLT/RTL/context.h" #include <cuda.h> #include <builtin_types.h> #include <stdlib.h> #include <string.h> #include <assert.h> // Define PTX suffix for different platfor...
/* * Copyright (c) 1991 <NAME> * * Disclaimer: No guarantees of performance accompany this software, * nor is any responsibility assumed on the part of the authors. All the * software has been tested extensively and every effort has been made to * insure its reliability. */ /* * correl.c - cross-correlate tw...
/* MIT License Copyright (c) 2019 <NAME> 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, copy, modify, merge, publish, distrib...
#include <fcntl.h> #include <libgen.h> #include "common.h" #include "messages.h" struct client_context { char *buffer; struct ibv_mr *buffer_mr; struct message *msg; struct ibv_mr *msg_mr; uint64_t peer_addr; uint32_t peer_rkey; int fd; const char *file_name; int payload_idx; char *payload; }; char ...
//@AUTHOR : <NAME> <<EMAIL>> //@lICENSE: MIT //@DATE : 2021-04-29 #include <stdio.h> #include <stdlib.h> #include <stdbool.h> #define DATA_STRUCT_NAME "Queue" //----------------------------------------------------------- //DATA typedef int Data; #define DATA_FORMAT "%d" #define PRINT_SEPARATOR "->" //------------...
/** Onion HTTP server library Copyright (C) 2010-2018 <NAME> and others This library is free software; you can redistribute it and/or modify it under the terms of, at your choice: a. the Apache License Version 2.0. b. the GNU General Public License as published by the Free Software Foundation; either v...
#include <stdio.h> #include <stdlib.h> int** algorithm(r, circuit, m) int r; int **circuit; int *m; { int done, b[r][r], x[r], bc[r][r], k, n, c, nu, i, j, f; /*BLOCK 1*/ /*inizalizzo b a zero*/ for(i=0; i<=r-1; i++) for(j=0; j<=r-1; j++) b[i][j]=0; for(i=0; i<=r-1; i++) { done=0; for(j=i...
/**************************************************************************** * Included Files ****************************************************************************/ #include <sdk/config.h> #include <nuttx/config.h> #include <stdio.h> #include <string.h> #include <stdlib.h> #include <dirent.h> #include <fcntl...
#include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include "e4/e4.h" #include "e4/util.h" #include "e4/strlcpy.h" #include "e4/crypto/sha3.h" #include "pubkey_kat.h" const size_t ITER_MAX = 100; const size_t PT_MAX = 100; const size_t NUM_TOPICS = 10; const size_t NUM_DEVICES = 10; const...
/* Functions to produce and send the HTTP response * Life of a response: * 1) response_process is called when the request is ready to be processed * 2) A Ruby thread is created and response_run is called inside it. * 3) response_run calls the Rack application (c->backend->app) * 4) response_send_status, response_s...
/** * \file reader_utils.c * \copyright This file is part of the Open-ISO7816-Stack project and is distributed under the MIT license. See LICENSE file in the root directory. * This file contains various utility functions usefull in many places in the code. Typically the enable computing/converting values of various...
/* * GPLv2 * Copyright 2003, <NAME> <<EMAIL>> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as published * by the Free Software Foundation; either version 2 of the License. * * This program is distributed in the ho...
//----------------------------------------------------------------------------- // // ImageLib GL Test Source // Copyright (C) 2000-2002 by <NAME> // Last modified: 05/17/2002 <--Y2K Compliant! =] // // Filename: examples/gl example/gl example.c // // Description: Sample implementation of an OpenGL image viewer. // //-...
/* * Net_Raw_Socket.c * * Created on: 2016年11月20日 * Author: morris * 要求: * 网络编程之---原始套接字编程 * ARP断网攻击实验 * ******************************************************************** * 1. ARP(Address Resolution Protocol),地址解析协议 * 2. 该协议用来根据IP地址获取其对应的物理地址 * 3. 地址解析协议是建立在网络中各个主机互相信任的基础上的,网络上的主机可以自主发送 * ARP...
/* * Copyright (c) 2020-2021, yzrh <<EMAIL>> * * SPDX-License-Identifier: Apache-2.0 */ #ifdef __linux__ #define _GNU_SOURCE #endif /* __linux__ */ #include <stdlib.h> #include <string.h> #include "pdf.h" static void * _memmem_whitespace(const void *p0, size_t s0, const void *p1, size_t s1) { const char whit...
#include <xc.h> #include <stdbool.h> #include <stdint.h> #include <string.h> #include "fileio_config.h" #include "fat12.h" #include "settings.h" #define MEDIA_SECTOR_SIZE FILEIO_CONFIG_MEDIA_SECTOR_SIZE #define MEDIA_ROOT_ENTRIES DRV_FILEIO_CONFIG_INTERNAL_FLASH_MAX_NUM_FILES_IN_ROOT #define MEDIA_CAPACITY ...
#define _BSD_SOURCE #include <unistd.h> #include <stdbool.h> #include <stdio.h> #include <stdlib.h> #include <stdarg.h> #include <string.h> #include <strings.h> #include <time.h> #include <sys/types.h> #include <sys/stat.h> #include <sys/statvfs.h> char * smprintf(char *fmt, ...) { va_list fmtargs; char *ret; int l...
/* Author: <NAME> */ #include <stdlib.h> #include <stdio.h> typedef struct tno { int dado; struct tno * anterior; struct tno * proximo; } tipoNo; typedef tipoNo * pnoh; typedef struct { int tamanho; pnoh primeiro; pnoh ultimo; } tcabec; typedef tcabec * TLista; TLista criaLista() { TLi...
/* ------------------------------------------------------- hd44780.c Softwaremodul fuer grundlegende Funktionen eines HD44780 kompatiblen LC-Textdisplays Hardware : Text-LCD MCU : Takt : 14.02.2020 <NAME> ---------------------------------------...
#include<stdio.h> void selectSort(int A[], int N); //选择排序 void bubbleSort(int A[], int N); //冒泡排序 void insertSort(int A[], int N); //插入排序 void shellSort(int A[], int N); //希尔排序 void heapSort(int A[], int N); //堆排序 void mergeSort(int A[], int N); //归并排序 void quickSort(int A[], int N); //快速排序 int main(){ int a[10...
/* C functions for running SampleTau from Cython*/ /*System includes*/ #include <stdlib.h> #include <stdio.h> #include <math.h> #include <string.h> #include <sys/stat.h> /*GSL includes*/ #include <gsl/gsl_vector.h> #include <gsl/gsl_matrix.h> #include <gsl/gsl_rng.h> #include <gsl/gsl_randist.h> #include <gsl/gsl_mat...
#include "../include/leaf.h" #include "../include/hash.h" #include <sys/stat.h> #include <errno.h> #include <dirent.h> #include <sys/stat.h> #if __WIN32 #define mkdir(A, B) mkdir(A) #else #include <unistd.h> #include <sys/types.h> #include <pwd.h> #endif bool path_exists(const char * path){ struct stat st = {0}; if...
/* $OpenBSD: stack.c,v 1.4 2014/08/10 05:08:31 guenther Exp $ */ /* PUBLIC DOMAIN Feb 2012 <<EMAIL>> */ /* Test the handling of the pthread_attr_t stack attributes */ #include <sys/types.h> #include <sys/mman.h> #include <stdint.h> #include <limits.h> #include <pthread.h> #include <stdio.h> #include <stdlib.h> #inclu...
#include <stdio.h> char *child[2][4][4]; char *parent[2][4][4]; int main() { char ch; char sang[3][5]; int n_sang[3]; int p[3]; char rh[3]; int empty; int permuta; int per[2]; int n_per; int c; int i; child[0][0][0] = "{A-, O-}"; child[0][0][1] = child[0][1][0] =...
/* * AWS IoT EduKit - Core2 for AWS IoT EduKit * EllieMeter v2.1.0 * keyoard.c * * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software")...
#define IP_STR 16 /* ip string biggest size: 000 .000.000.000\0 */ #define FIT_USEC 1000000 /* fit all times to microseconds */ #define BLOCK_TIMER -1 /* stop the timer that remove flows from the list */ #define IP_TYPE 8 /* code of IP protocol */ /* ethernet headers are always exactly 14 bytes [1] */ #define SI...
/* * Copyright © 2019 LambdAurora <<EMAIL>>, <NAME> <<EMAIL>> * * This file is part of fictional_couscous_isn. * * Licensed under the MIT license. For more information, * see the LICENSE file. */ #include "draw.h" void draw( const Game* game, const World* world, size_t layer,double fov,...
#include <portals4.h> #include <support.h> #include <assert.h> #include <stddef.h> #include <stdlib.h> #include <stdio.h> #include <sched.h> #include <string.h> #include "testing.h" #if INTERFACE == 1 # define ENTRY_T ptl_me_t # define HANDLE_T ptl_handle_me_t # define NI_TYPE PTL_NI_MATCHING # define OPTIONS (PT...
/* Some crap from BSD mail to parse email addresses. * * <NAME> <<EMAIL>> stole these functions from FreeBSD * ports, and reformatted them to use mlmmj's coding style. The * original functions (skip_comment and skin) had the following * copyright notice: */ /* * Copyright (c) 1980, 1993 * The Regents of the U...
#include <stdio.h> #include <math.h> #include <stdlib.h> #define MAX_TST 5 #define FXPOINT 0.75 #define SCALE 1 const char* fName = "./src/T.csv"; const char* gName = "./src/D.csv"; const char* tfName = "./src/_T.csv"; const char* tgName = "./src/_D.csv"; const char* ioName = "io.csv"; const int m = 21, n = 81; doub...
#include<math.h> #include<string.h> #include<stdio.h> #include<stdlib.h> #include<time.h> #include<ctype.h> void swap(char *a,char *b){ char tmp=*b; *b=*a; *a=tmp; } char * shuffle_array(char text[]){ srand(time(NULL)); //printf("SHUFF: %zi\n",strlen(text)); char *curr=(char*)malloc((strlen(text)+1)*sizeof(char))...
#include "arkanoid_engine.h" int ArkanoidEngine_init() { if (!glfwInit()) { printf("glfwInit error\n"); return GL_FALSE; } glfwOpenWindowHint(GLFW_WINDOW_NO_RESIZE, GL_TRUE); if (!glfwOpenWindow( ARKANOID_WINDOW_WIDTH, ARKANOID_WINDOW_HEIGHT, ARKANOID_COLOR_DE...
#include <stdio.h> #include <stdlib.h> #ifndef UNICODE # define UNICODE #endif #include <windows.h> #if defined(__MINGW32__) && !defined(IMAGE_SUBSYSTEM_WINDOWS_BOOT_APPLICATION) # define IMAGE_SUBSYSTEM_WINDOWS_BOOT_APPLICATION 16 #endif #define XFER_BUFFER_SIZE 2048 #ifndef IMAGE_SIZEOF_NT_OPTIONAL_HEADER...
/** * \file * * \brief Blood Pressure Sensor Application Declarations * * Copyright (c) 2016 Atmel Corporation. All rights reserved. * * \asf_license_start * * \page License * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following condi...
/* * Copyright (C) 2018-2019 <NAME> */ #include "log.h" #include <stdarg.h> #include <stdlib.h> #include <stdio.h> /* vsnprintf() */ #include <string.h> #include <time.h> #include <vtm/core/error.h> #include <vtm/core/format.h> #include <vtm/core/types.h> #include <vtm/util/mutex.h> #include <vtm/util/process.h> #...
/***************************************************************************//** * @file error_rate_ci.c * @brief This file provides functionality to test RAIL error rates. * @copyright Copyright 2015 Silicon Laboratories, Inc. http://www.silabs.com **************************************************************...
#include "pizza-service.h" void setup(void) { setvbuf(stdin, NULL, 2, 0); setvbuf(stdout, NULL, 2, 0); setvbuf(stderr, NULL, 2, 0); } void banner(void) { printf("\ _____ _ _____ _ _ _____ _ \n\ | __ (_) | __ \\ | (...
/* * GRUB -- GRand Unified Bootloader * Copyright (C) 2010,2011 Free Software Foundation, Inc. * * GRUB is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at...
/*************************************************************************** * __________ __ ___. * Open \______ \ ____ ____ | | _\_ |__ _______ ___ * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / * Jukebox | | ( <_> ) \___| < | \_\ ( <_> ...
/* * Copyright (c) 1993-2009, <NAME>. * Copyright (c) 1990, <NAME>. * Copyright (c) 1989, Georgia Tech Research Corporation (GTRC), Atlanta, * GA 30332. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following condi...
/* * Copyright (c) 2008, <NAME>, Communications & Systemes <<EMAIL>> * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyr...
// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include <stdlib.h> #include <stdio.h> #include <stdint.h> /* This sample uses the _LL APIs of iothub_client for example purposes. That does not mean that MQTT only w...
#include <ctype.h> #include <debug.h> #include <random.h> #include <stdlib.h> #include <stdbool.h> /* Converts a string representation of a signed decimal integer in S into an `int', which is returned. */ int atoi (const char *s) { bool negative; int value; ASSERT (s != NULL); /* Skip white space. */ wh...
/* Copyright (c) 2017, <NAME> * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the...
#include <stdio.h> #include <stdlib.h> #include "parser/main/util/parse_astnode.h" #include "Stmt.h" #include "WhileStmt.h" #include "ForStmt.h" #include "LoopStmt.h" #include "IfStmt.h" #include "RetStmt.h" #include "Call.h" #include "AssignStmt.h" #include "SwitchStmt.h" #include "TryCatchStmt.h" #include "ast/uti...
/* ** palette: palette program. ** Copyright (C) 2002~2007 <NAME> ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 2 of the License, or ** (at your option) any later versi...
/****************************************************************************** * @file main.c * @version V1.00 * $Revision: 4 $ * $Date: 15/01/16 11:44a $ * @brief Show how to read/program embedded flash by ISP function. * @note * Copyright (C) 2018 Nuvoton Technology Corp. All rights reserved. ********...
/* * %CopyrightBegin% * * Copyright Ericsson AB 1999-2021. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 ...
/* * Copyright (c) 2002-2008 <NAME>, <NAME> * Copyright (c) 2002-2008 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copie...
/* * Copyright 2017-2018 AVSystem <<EMAIL>> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law o...
/* * Copyright (c) 2004, <NAME>.. All rights reserved. * Created by: <NAME> * This program is free software; you can redistribute it and/or modify it * under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it wou...
/* * FreeRTOS V202012.00 * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * 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 ...
/* * Intel CPU Microcode Update Driver for Linux * * Copyright (C) 2012 <NAME> <<EMAIL>> * <NAME>" <<EMAIL>> * * This driver allows to upgrade microcode on Intel processors * belonging to IA-32 family - PentiumPro, Pentium II, * Pentium III, Xeon, Pentium 4, etc. * * Reference: Section 8.11 of Volume 3a,...
// Copyright (C) 2019 <NAME> <<EMAIL>> #include <assert.h> #include "datatypes/bitarray.h" void test_twiddling() { assert(rightmost_clear_bit(1) == 1); assert(rightmost_clear_bit(3) == 2); assert(rightmost_clear_bit(7) == 3); assert(rightmost_clear_bit(5) == 1); } void test_basic() { bitarray *ba ...
/* The MIT License (MIT) Copyright (c) 2020 OpenUVR 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, co...
/** * Copyright (c) 2016 - 2018, Nordic Semiconductor ASA * * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice,...
#include <stdio.h> #include <math.h> #include "esp_log.h" #include <speedctrl.h> #include "freertos/FreeRTOS.h" #include "freertos/queue.h" static SpeedCtrl_t* pself; static const char *TAG = "SPDCTRL"; //static QueueHandle_t rspeed_queue; const float speed_threshold = 0.5; void speedctrl_init(SpeedCtrl_t* self) { ...
/* * ng_ubt_intel.c */ /*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2019 <NAME> <<EMAIL>> * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must re...
#include <avr/io.h> #include <avr/interrupt.h> #include <avr/pgmspace.h> #include <util/delay.h> #include "ps2.h" #include "usart.h" #include "decode.h" #include "config.h" extern volatile uint8_t rx_count; extern volatile uint8_t rx_error; volatile uint8_t PS2_buffer[PS2_BUFFER]; volatile uint8_t PS2_head...
/* Controls a motor using the L293D motor driver. PINS (On Raspberry Pi B+): +------------+------+--------------+ | DRIVER PIN | GPIO | PHYSICAL PIN | +------------+------+--------------+ | ENABLE 1 | 0 | 11 | | ENABLE 2 | 1 | 12 | | INPUT 1 | 2 | 13 | | INPUT 2 ...
/* $NetBSD: humanize_number.c,v 1.14 2008/04/28 20:22:59 martin Exp $ */ /* * Copyright (c) 1997, 1998, 1999, 2002 The NetBSD Foundation, Inc. * Copyright 2013 <NAME> <<EMAIL>> * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by <NAME> of the Numerical Aerospac...
/* * extent.c --- ext2 extent abstraction * * This abstraction is used to provide a compact way of representing a * translation table, for moving multiple contiguous ranges (extents) * of blocks or inodes. * * Copyright (C) 1997, 1998 by <NAME> and * PowerQuest, Inc. * * Copyright (C) 1999, 2000 by <NAME> *...
#pragma once #include <functional> #include "../sscanf.h" enum E_SSCANF_ERROR { OK, ERROR_NOT_INITIALISED, // "UNFORMAT_Init" not yet called. ERROR_MISSING_PARAMETERS, // Not enough parameters given. ERROR_NO_SPECIFIER, // No specifier passed. ERROR_NO_COMPILE, // Unspecified compilation error. ERROR_UNKNOWN_E...
#include "graph.h" struct graph *graph_new(unsigned long nnodes){ struct graph *t=malloc(sizeof(struct graph)); t->nnodes=nnodes; t->arr=malloc(sizeof(unsigned long long*)*nnodes); t->marks=malloc(sizeof(char*)*nnodes); for(unsigned long long i=0;i<nnodes;i++){ t->arr[i]=malloc(sizeof(unsigned long long)*nnodes)...
#include <string.h> #include <stdio.h> #include <stdlib.h> #include <assert.h> #include <errno.h> /* * The dir structure is used in walking directories. For these two cases, * these map to directory tuples: {start, end, depth}: * char *a = "/job/one" {&a[0], &a[1], 1} {&a[1], &a[5], 2} {&a[5], &a[8], 3} {&a[8], &a...
/** * Copyright 2016 <NAME>, <NAME>' * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in w...
/* USER CODE BEGIN Header */ /** ****************************************************************************** * File Name : freertos.c * Description : Code for freertos applications ****************************************************************************** * @attention * * <h...
/* Copyright (c) 2007 <NAME> <<EMAIL>> 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, copy, mod...
#include <limits.h> #include <math.h> #include <genmap-impl.h> // // TODO: use a separate function to generate init vector // int GenmapFiedlerRQI(genmap_handle h, struct comm *gsc, int max_iter, int global) { GenmapInt lelt = genmap_get_nel(h); genmap_vector initVec; genmap_vector_create(&i...
// // NIST-developed software is provided by NIST as a public service. // You may use, copy and distribute copies of the software in any medium, // provided that you keep intact this entire notice. You may improve, // modify and create derivative works of the software or any portion of // the software, and you may cop...
#include <net/if_arp.h> #include <arpa/inet.h> #include <stdio.h> #include <unistd.h> #include <sys/socket.h> #include <string.h> #include <sys/types.h> #include <sys/socket.h> #include <netinet/ip.h> #include <net/if.h> #include <netinet/ip6.h> #include <netinet/ip_icmp.h> #include <linux/if_packet.h> #include <net/et...
#include <stdio.h> #include "libgetkey.h" static void println (utf8 c, char *msg) { fprintf (stdout, "Pressed (int): %d, char |%s|\r\n", c, msg); } static char *ustring_character (utf8 c, char *buf, int *len) { *len = 1; if (c < 0x80) { buf[0] = (char) c; } else if (c < 0x800) { buf[0] = (c >> 6) | 0...
/* * foo-tools, a collection of utilities for glftpd users. * Copyright (C) 2003 Tanesha FTPD Project, www.tanesha.net * * This file is part of foo-tools. * * foo-tools is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Soft...
/* MIT/X Consortium License * * © 2011-2016 <NAME> <<EMAIL>> * * See LICENSE file for copyright and license details. * * wtb - print currently open bug ID */ #include <stdio.h> #include <stdlib.h> #include <stdbool.h> #include <string.h> #include <regex.h> #include <limits.h> #include <getopt.h> #include <X11/...
/* * Copyright (C) 2004 <NAME> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is di...
#include "platforms.h" #include "mri_platform_freedom_metal.h" #include <metal/uart.h> #include <string.h> static struct metal_uart *uart0; /* Freedom Metal doesn't expose the RX_EMPTY bit independently of the return status when trying to consume a character, so we have to buffer at least one character, and de...
/* * BVP (BI VAX port) definitions * used by the NI (DEBNA) driver, * and perhaps eventually by the BVP MSCP port */ typedef struct quadque { struct quadque *head, *tail; } quadque; /* * port queue block * one per port; * must be page-aligned */ struct pqb { quadque p_cmdq[4]; /* command queues */ quadque ...
/* Copyright 2004,2007,2009 ENSEIRB, INRIA & CNRS ** ** This file is part of the Scotch software package for static mapping, ** graph partitioning and sparse matrix ordering. ** ** This software is governed by the CeCILL-C license under French law ** and abiding by the rules of distribution of free software. You can **...
#include <stdio.h> #include <stdlib.h> #include <unistd.h>//Used for UART #include <fcntl.h>//Used for UART #include <termios.h>//Used for UART #include <math.h> int uart0_filestream; void init(char* device, int uartClock){ //------------------------- //----- SETUP USART 0 ----- //------------------------- //...