text
stringlengths
3.12k
18.7k
/* --COPYRIGHT--,BSD_EX * Copyright (c) 2013, Texas Instruments Incorporated * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above c...
/** * @copyright (c) 2017 King Abdullah University of Science and Technology (KAUST). * All rights reserved. **/ /** * @file hcore_dsyrk.c * * HCORE routines * HCORE is a software package provided by King Abdullah University of Science and Technology (KAUST) * * @version 0.1.1 * @author ...
/* * kbdbuf.c - Kernal keyboard buffer handling for VICE. * * Written by * <NAME> <<EMAIL>> * <NAME> <<EMAIL>> * <NAME> <<EMAIL>> * * This file is part of VICE, the Versatile Commodore Emulator. * See README for copyright notice. * * This program is free software; you can redistribute it and/or modify *...
/* Shared library add-on to iptables to add destination-NAT support. */ #include <stdio.h> #include <netdb.h> #include <string.h> #include <stdlib.h> #include <getopt.h> #include <iptables.h> #include <linux/netfilter_ipv4/ip_tables.h> #include <linux/netfilter_ipv4/ip_nat_rule.h> #include <linux/netfilter_ipv4/ipt_DN...
/// /// @file /// /// @brief This example demonstrates how to use the distributed memory interface /// functions with generalized eigenvalue problems. /// /// @author <NAME> (<EMAIL>), Umeå University /// /// @section LICENSE /// /// Copyright (c) 2019-2020, Umeå Universitet /// /// Redistribution and use in source and...
/* * This binary is a workaround for HTC's unlock method that doesn't let * you flash boot while booted to recovery. It is designed to dump * recovery and boot to the sdcard then flash recovery to boot. When * used with a supported recovery, you can reflash the dumped copy of * boot once you enter the recovery. ...
#include "icon.h" #include <assert.h> #include <cairo.h> #include <gdk-pixbuf/gdk-pixbuf.h> #include <stdbool.h> #include <string.h> #include "log.h" #include "notification.h" #include "settings.h" #include "utils.h" static bool is_readable_file(const char *filename) { return (access(filename, R_OK) != -1); ...
// AOC 2015 solution in C // @chadsy // Copyright (C) 2021 <NAME> // MIT License http://opensource.org/licenses/MIT // // Day 7 // // The one about Little Bobby Tables getting a cheap knockoff of a verilog kit. // // Gah. This is the one that makes me wish I had chosen something like Python // or super modern C++ for i...
#include <gst/gst.h> #include <string.h> #include <stdio.h> #include <stdlib.h> typedef struct _SourceAndSink { GstElement *source, *sink; } SourceAndSink; typedef struct _GstContext { GstElement *pipeline; gboolean is_live; GMainLoop *loop; SourceAndSink *main; SourceAndSink *inset; } GstContext; static...
/* * Copyright (c) 2016, ARM Limited, All Rights Reserved * SPDX-License-Identifier: Apache-2.0 * * 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/LICE...
#include <stdio.h> #include <string.h> // memset #include "qpu_program.h" #include "qpu_info.h" /* QPU Program Simple interface for a General purpose program After creation, you need to lock the progmem buffer and fill in the progmem code and uniforms Currently, exeuting on multiple GPUs will execute them all wit...
/** * A small, portable, and powerful C library for dynamic arrays. * * 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: * * * Redistributions of source code mus...
/* https://www.hackerrank.com/challenges/qheap1/problem Success Rate: 67.73% */ /* ******* Scratch Work ******* Notes from Carrano, Chapter 26, A Heap Implementation. A heap is a complete binary tree whose nodes are ordered in specific manner. In a maxheap each node is greater than or equal to ...
/* SD card and FAT filesystem example. This example code is in the Public Domain (or CC0 licensed, at your option.) Unless required by applicable law or agreed to in writing, this software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ #incl...
/* device_info.c - Collect device information for mkfs.fat Copyright (C) 2015 <NAME> <<EMAIL>> Copyright (C) 2018 <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, eith...
/* * Toy program for drawing bitmaps with Code Page 437 type * graphics. * * Compile like so: * $ gcc -DCP437_MAIN cp437.c ../bmp.c * * See https://en.wikipedia.org/wiki/Code_page_437 */ #include <stdio.h> #include <stdlib.h> #include <stdarg.h> #include <assert.h> #include "../bmp.h" #include "cp437.h" #i...
/* * Copyright (c) 2019-2021 <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, modify, merge, pub...
#include "ucg.h" #include <stdlib.h> #include <stdio.h> int ucg_sdl_get_key(void); ucg_t ucg; uint8_t x_my_init_sequence[] = { UCG_CFG_CD(0,0), UCG_RST(0), UCG_DLY_MS(2), UCG_RST(1), UCG_DLY_MS(2), UCG_VARY(7,255,0), UCG_C11(0xaa, 0x055), UCG_END() }; uint8_t my_init_sequence[] = { UCG_CS(0), ...
/* This file contains code to process the syscall "perf_event_open" */ #include <inttypes.h> #include <sys/types.h> #include <stdlib.h> #include <stdint.h> #include <unistd.h> #include <string.h> #include <sys/mman.h> #include <sys/ioctl.h> #include <sys/errno.h> #include <linux/perf_event.h> #include "./include/types...
/** * @file conf.c * @author <NAME> (<EMAIL> or <EMAIL>) * @date 2015. * @brief Configuration loading functions for the SZ library. * (C) 2015 by Mathematics and Computer Science (MCS), Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ #include <math.h> #include "string.h" #...
/* * This is a low level module for handling paging. It has routines to map/unmap * virtual addresses to physical addresses. */ #include <kcheck.h> #include <assert.h> #include <logger.h> #include <mm/page_frame.h> #include <mm/page_alloc.h> #include <mm/paging.h> #include <mm/types.h> #include <string.h> #include...
/** * @{ * * @brief Main application for the mp3 player. * @author Copyright (C) <NAME> <<EMAIL>> * @author Copyright (C) <NAME> <<EMAIL>> * * @} */ #include <stdio.h> #include <stdint.h> #include <stm32f4xx.h> #include <string.h> /** HAW-TI-LAB libraries */ #include "CE_Lib.h" #inc...
#include <stdio.h> #include <string.h> #include <stdlib.h> #include "libparsifal/parsifal.h" #include "libparsifal/dtdvalid.h" int StartElement(void *UserData, const XMLCH *uri, const XMLCH *localName, const XMLCH *qName, LPXMLVECTOR atts); int StartElementSimple(void *UserData, const XMLCH *uri, const XMLCH *localNam...
/* * Copyright (c) 2014 <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 an...
#include <stdlib.h> #include <GLUT/glut.h> #include <math.h> #include <dirent.h> #include <stdio.h> #include "map.h" /* Debug */ void drawPoint(int x, int y) { glColor3f(0,1,0); glPointSize(4); glLineWidth(2); glBegin(GL_POINTS); glVertex2i(x, y); glEnd(); } /* Generic functions */ float degToRad(int a) { re...
/* $NetBSD: podulebus_io.c,v 1.1 2001/10/05 22:27:57 reinoud Exp $ */ /* * Copyright (c) 1997 <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 ...
/* Copyright 1999-2003,2007 TiANWEi This file is part of Regshot. Regshot 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 ve...
/*--- This software is copyrighted by the Regents of the University of California, and other parties. The following terms apply to all files associated with the software unless explicitly disclaimed in individual files. ...
#include <stdlib.h> #include <stdio.h> #include <string.h> #include <pthread.h> #include <math.h> #include <curl/curl.h> #include "cache/cache.h" #include "vcc_cfg_if.h" #include "cJSON.h" #include "ini.h" #include "helpers.h" #include "remote.h" #include "variables.h" struct vmod_cfg_file { unsigned magic; ...
#include <jvcr_ecm_01/machine.h> #include <jvcr_ecm_01/display.h> #include <stdlib.h> #include <GLFW/glfw3.h> #include <stdio.h> #include <jvcr_ecm_01/ram.h> #include <time.h> #include <math.h> #include <jvcr_ecm_01/input.h> static GLFWwindow *window; struct GLpoint { GLint x; GLint y; }; static struct GLpoint s...
/*++ Copyright (c) 1996 - 1999 Microsoft Corporation Module Name: qfontdat.c Abstract: Implements the DrvQueryFontData function - returns information about glyphs (size, position wrt box) or kerning information. Environment: Windows NT Unidrv driver Revision History: 12/...
/* * Red Pixel, a violent game. * Copyright (C) 1999 Psyk Software. * * Map editor: three hour job. * 06 June, 1998 */ #include <string.h> #include "a4aux.h" #include "blood.h" #include "colours.h" #include "globals.h" #include "map.h" #include "resource.h" #include "rpagup.h" static int tile_count; st...
#pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-variable" #pragma GCC diagnostic ignored "-Wunused-function" #include <aos/aos.h> #include <aos/aos_rpc_ump.h> #include "serialserver.h" #include <grading.h> #include <aos/syscalls.h> #include <aos/string.h> #include <aos/nameserver.h> #include <aos...
//-------------------------------------------- //NAME: <NAME> //CLASS: XIA //NUMBER: 08 //PROBLEM: starcraft3 //FILE NAME: main.c //FILE PURPOSE: main //-------------------------------------------- #include <stdio.h> #include <pthread.h> #include <stdlib.h> #include <unistd.h> #include <errno.h> #define M_CAPACITY 500...
/** * @file cmd_print.c * @author <NAME> <<EMAIL>> * @author <NAME> <<EMAIL>> * @brief 'print' command of the libyang's yanglint tool. * * Copyright (c) 2015-2020 CESNET, z.s.p.o. * * This source code is licensed under BSD 3-Clause License (the "License"). * You may not use this file except in compliance with ...
/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1989 <NAME> Modified: 2000 AlansFixes **********/ /* load the MOS6 device structure with those pointers needed later * for fast matrix loading */ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" ...
/*- * SPDX-License-Identifier: BSD-3-Clause * * Copyright (c) 1983 Regents of the University of California. * 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 sourc...
#include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <time.h> #include "constants.h" #include "jja.h" #include "jja_cli.h" extern int method; extern int display; extern ffloat Idc_start; extern ffloat Idc_end; extern ffloat dIdc; extern ffloat Omega_1; extern ffloa...
#define _GNU_SOURCE #include <stdint.h> #include <stdio.h> #include <string.h> #include <time.h> #include <unistd.h> #include <signal.h> #include <sched.h> #define WIDTH 64 #define HEIGHT 32 uint8_t dram[0x1000]; // data ram __attribute__((aligned(8))) void * iram[0x1000]; // instruction ram (opcode + operand word fo...
/* * ADAM - feature functions * name: adam_data_featurefunction * description: system catalogs table supporting functions for adam * * developed in the course of the MSc thesis at the University of Basel * * author: <NAME> * email: <EMAIL> * * src/backend/catalog/adam_data_featurefunction.c * * * * *...
/* Written by: <NAME> Nikita */ #include "tests.h" #define PASS 1 #define FAIL 0 /* format these macros as you see fit */ #define TEST_HEADER \ printf("[TEST %s] Running %s at %s:%d\n", __FUNCTION__, __FUNCTION__, __FILE__, __LINE__) #define TEST_OUTPUT(name, result) \ printf("[TEST %s] Result = %s\n", name, (res...
typedef struct TKPE_ImageInfo_s TKPE_ImageInfo; typedef struct TKPE_TaskInfo_s TKPE_TaskInfo; typedef struct TKPE_TaskInfoUser_s TKPE_TaskInfoUser; typedef struct TKPE_TaskInfoKern_s TKPE_TaskInfoKern; typedef struct TK_EnvContext_s TK_EnvContext; typedef struct TKSH_CommandInfo_s TKSH_CommandInfo; struct TK...
/** General mathematical functions and supporting utilities library. This C module is designed to be accessed as utils4.mathfuncs, in Python. */ #include <float.h> #include <limits.h> #include <math.h> #include <stdbool.h> #include <stdio.h> #include <stdlib.h> #define PHI (1 + sqrt(5)) / 2 // --------...
/* Dia -- a diagram creation/manipulation program * Copyright (C) 1998 <NAME> * * Property system for dia objects/shapes. * Copyright (C) 2000 <NAME> * Copyright (C) 2001 <NAME> * Major restructuration done in August 2001 by <NAME> * * proplist.c: Property list handling routines. * * This program is free soft...
//gcc -o test test.c -lssl -lcrypto #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <unistd.h> #include <arpa/inet.h> #include <netdb.h> #include <unistd.h> #include <signal.h> #include <stdio.h> #include <string.h> #include <fcntl.h> #include <errno.h> #include <sys/time.h> #include <st...
#define _BSD_SOURCE #define _XOPEN_SOURCE #include <stdio.h> #include <unistd.h> #include <stdlib.h> #include <string.h> #include <sys/wait.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #define RWRWRW (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH) /********************************************...
#include<dev/char/console.h> #include<dev/char/tty.h> /*最多阻塞原因*/ #define MAX_WAIT_REASON 20 /*最大优先级*/ #define MAX_PRIORITY 10 /*最大PCB个数,包括空白PCB*/ #define MAX_PCB_NR_1 5000 /*最大非空白PCB数*/ #define MAX_PCB_NR (MAX_PCB_NR_1-1-MAX_PRIORITY-MAX_WAIT_REASON*MAX_PRIORITY) /*任务数据结构*/ typedef struct tss{ unsigned int lselector...
#include <stdio.h> #include "bootpack.h" #include "desctbl.h" #include "fifo.h" #include "graphic.h" #include "int.h" #include "io.h" #include "keyboard.h" #include "memory.h" #include "mouse.h" #include "sheet.h" #include "task.h" #include "timer.h" #include "window.h" void task_b_main(struct Sheet *sht_back) { st...
/* OTA Example This example code is in the Public Domain (or CC0 licensed, at your option.) Unless required by applicable law or agreed to in writing, this software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ #include <stdio.h> #include <...
/******************************************************************************* <NAME> <EMAIL> *****************************************************************************/ /*----------------------------------------------------------------------------*/ #include <menu/menu_states.h> #include <time...
#include <string.h> #include <assert.h> #include <gmp.h> #include "mpfq_p_127_735.h" #include "crypto_dh.h" #include "randombytes.h" #define SECRETKEY_BYTES crypto_dh_SECRETKEYBYTES #define PUBLICKEY_BYTES crypto_dh_PUBLICKEYBYTES #define SHAREDSECRET_BYTES crypto_dh_BYTES #define LIMB_PER_ELT (128/GMP_LIMB_BITS) ty...
/* External utility functions for Modelica package Modelica.Functions.Strings. Release Notes: Sep. 24, 2004: by <NAME>. Final cleaning up of the code Sep. 9, 2004: by <NAME>, Dynasim AB. Implementation of scan functions Aug. 19, 2004: by <NAME>, DLR....
/* Copyright <2020> <<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, distribute, sublicens...
#define NULL ((void*)0) typedef unsigned long size_t; // Customize by platform. typedef long intptr_t; typedef unsigned long uintptr_t; typedef long scalar_t__; // Either arithmetic or pointer type. /* By default, we understand bool (as a convenience). */ typedef int bool; #define false 0 #define true 1 /* Forward d...
/* * aclock - ASCII clock for MSX-DOS to run on MSX2, MSX2+ & MSX turbo R * * Copyright (c) 2002-2018 by <NAME> <<EMAIL>> * Copyright (c) 2018-2020 by <NAME> <<EMAIL>> * * Version 1.9 (sdcc-z80-msxdos); Campinas, January 2020 * * Download SDCC backend for MSXDOS at: * http://msx.atlantes.org/index_en.html#sdcc...
/* * If not stated otherwise in this file or this component's Licenses.txt file the * following copyright and licenses apply: * * Copyright 2015 RDK Management * * 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 ...
/* xddopen - Makes the specified unit available for use. * Initializes the DCB every time called. * xddsmartopen - Makes the specified unit available for use. * Initializes the DCB only if it hasn't been already. * * * Purpose: * * Written by: <NAME> * Date: Sept...
/* * Copyright (c) 2007, IRTrans GmbH * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright * notice, this list of co...
#include <stdlib.h> #include <string.h> #include <stdio.h> #include "HeapCache.h" #include "Region.h" #include "Runtime.h" #include "LoadKAM.h" /* * Checkpointing execution of library code */ /* * Static function declarations */ // [newHeap()] returns an uninitialized heap - with status // HSTAT_UNINITIALIZED. ...
/*- * Copyright (c) 2012 <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 ...
/* * Copyright (c) 2015 IBM Corporation * Copyright (c) 2019 Intel Corporation * 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 abov...
#define _GNU_SOURCE #include "fork.h" #include "common.h" #include "exitcode.h" #include "noise.h" #include <fsdyn/integer.h> #include <fsdyn/list.h> #include <unixkit/unixkit.h> #include <errno.h> #include <fcntl.h> #include <paths.h> #include <sys/wait.h> #include <unistd.h> // Within this code, we have three se...
///////////////////////////////////////////////////////////////////////////////// // GND 电源地 // VCC 接5V或3.3v电源 // SCL 接PA5(SCL) // SDA 接PA7(SDA) ///////////////////////////////////////////////////////////////////////////////// #include "pa_oled.h" #include "...
/* ------------------------------------------------------------------------- * * File: xsal_create_thread.c * * Copyright: 2006,2011 Delphi Technologies, Inc., All Rights Reserved * Information Contained Herein Is Proprietary and Confidential * * Author: <NAME> (<EMAIL>) * * Descript...
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* mlx_xpm.c :+: :+: :+: ...
/* Psychtoolbox3/Source/Common/SCREENGetMovieImage.c AUTHORS: mario.kleiner at tuebingen.mpg.de mk PLATFORMS: This file should build on any platform. HISTORY: 10/23/05 mk Created. DESCRIPTION: Fetch an image from the specified movie object and create an OpenGL texture out of it. Return a han...
/* Copyright 2018-2019 Free Software Foundation, Inc. This file is part of the GNU MP Library test suite. The GNU MP Library test suite 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 Lic...
#include "atapio.h" #include "screenstuff.h" #include "paging.h" typedef struct { uint32_t base_low; uint32_t base_high; uint32_t length_low; uint32_t length_high; uint32_t type; uint32_t acpi3_extended; }__attribute__((packed)) e820entry; uint8_t* bitmap = 0x100000; void set_bit(uint32_t offset, uint8_t...
/* * IR.c */ #include "Include.h" /* structs */ typedef struct { Char docName[DocNameLength]; UInt16 version; UInt16 records; } IRHeader; /* protos */ static Boolean GetHdrInfo(DB *, UInt16 *, UInt16 *); /* * GetHdrInfo * * Retrieve various fields to be beamed to the other side from the header. * * -> db ...
#include "group.h" #include <string.h> #include <stdarg.h> #include <stdlib.h> #include <math.h> #include <stdio.h> #include "three_algebra.h" #include "object.h" #include "error.h" #include "ddcMalloc.h" #include "berendsen.h" #include "doubleMirror.h" #include "mpiUtils.h" #define MAX(A,B) ((A) > (B) ? (A) : (B)) st...
// Introduction to ThreadX threads and Thread Communication using Queues // // <EMAIL> // #include "Application.h" #define THREAD_COUNT (4) CyU3PThread ThreadHandle[THREAD_COUNT]; // Handles to my Application Threads void *StackPtr[THREAD_COUNT]; // Save these to track stack usage CyU3PQueue InputDataAvailable; ...
/* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License (the "License"). * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolar...
/* spi/i2c interface Copyright (c) 2018 ys1797 (<EMAIL>) License (MIT license): 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 ...
/* * * Copyright 2015 gRPC authors. * * 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 agree...
#include "font.h" #include "process.h" #include "scheduler.h" #include "types.h" #include "video_driver.h" #include "string.h" #define FONT_WIDTH 10 #define FONT_HEIGHT 15 #pragma pack(push) #pragma pack(1) extern ProcessSlot * currentProcess; typedef struct { word attributes; byte winA,winB; word granular...
/******************************* * *** Affichage à Persistance Rétinienne *** * * ETML Préapp - 2020 2021 * Auteur.e: <NAME> * Détails: * Code pour l'affichage à persistance rétinienne * du projet commun Jukebox du préapprentisage * 2020-2021. L'image à afficher provient d'un * broker MQTT, puis on l'af...
// // Created by song on 17-2-6. // #include "sys.h" static uint8_t fac_us = 0; static uint32_t fac_ms = 0; void delay_init(uint8_t sysclk) { SysTick->CTRL &= ~(1 << 2); //设置第二位为0,即时钟为HCLK/8 fac_us = (uint8_t) (sysclk / 8); //fac_us指的是1us的systick数目 fac_ms = ((uint32_t) sysclk * 1000) / 8;...
#include "problem.c" #include <math.h> #include <stdio.h> #include <time.h> #include <stdlib.h> #include <stdbool.h> #include <string.h> #define oo 10000000 extern const char* var_name[NUM_VARIABLES]; extern const int var_num_dim[NUM_VARIABLES]; extern const int var_shape[NUM_VARIABLES][3]; extern const int var_size[...
/* * Copyright (C) 2015 University of Oregon * * You may distribute under the terms of either the GNU General Public * License or the Apache License, as specified in the LICENSE file. * * For more information, see the LICENSE file. */ /* */ #ifndef LINUX #include <thread.h> #endif #include <pthread.h> #defin...
#include <stdlib.h> #include <stdbool.h> #include <string.h> #include <sys/mman.h> #include <fcntl.h> #include "corpus_io.h" #include "../tagger/tags.h" // tags with these types are never altered. void fix_newline(char*); bool ignore_tag(int hash){ //should be slightly faster than if statement switch(hash){ ...
#include <bgp.h> /* * Reset the keepalive timer */ void bgp_keepalive_tmr(bgp_state * state, tw_lp * lp) { if(0 == state->as->hold_interval) return; // keep the keepalive timer going state->tmr_keep_alive = bgp_timer_start(lp, state->tmr_keep_alive, state->as->keepalive_interval, KEEPALIVETIM...
/* * Invoke the CrossOver menu management scripts. * * Copyright 2012 <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 opt...
/** * Driving good-display epaper displays using an esp32. * Code has been adapted from the sample Arduino code from good-display to run * directly as an ESP-IDF program. * * This has been tested on a GDEM213U23 display. */ #include <stdio.h> #include "sdkconfig.h" #include "freertos/FreeRTOS.h" #include "freert...
#include <stdbool.h> #include <stdio.h> #include <stdlib.h> #include <string.h> typedef struct stud_type_ { /* Struktur des Datensatzes: */ int matnum; /* Matrikelnummer, Vor- */ char vorname[20]; /* und Nachname sind Eintraege. */...
#include "stm32f7xx.h" // Device header #include "can.h" CAN_msg CAN_TxMsg; // CAN messge for sending CAN_msg CAN_RxMsg; // CAN message for receiving unsigned int CAN1_TxRdy = 0; // CAN HW ready to transmit a message unsigned int CAN1_RxRdy = 0; // CAN HW received a message void CAN1_ready(void){ w...
/* Copyright (c) 2013, <NAME> See accompanying LICENSE --------------------------------------------------------------- smoothsort_fib_1.c Implementation of a varaition of Dijkstra's "smoothsort" algorithm. This version is similar to the one in smoothsort.c but with heaps of a sligh...
#include "wgscommon/wgs_file_tokenizer.h" enum TokenCommand { COMMAND_BREAK, COMMAND_JOIN, COMMAND_JOIN_AND_BREAK }; static wgs_bool is_white_space(wgs_char ch) { return ch == '\t' || ch == ' ' || ch == '\n' || ch == '\r' || ch == '\f' || ch == '\v' ? wgs_true : wgs_false; } static const wgs_char* describe(enum ...
/* repl.c - log modifications for replication purposes */ /* $OpenLDAP: pkg/ldap/servers/slapd/repl.c,v 172.16.58.3 2003/03/03 17:10:07 kurt Exp $ */ /* * Copyright 1998-2003 The OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file */ #include "portable.h" #include <stdio.h> ...
#include <stdio.h> #include <stdlib.h> #include <stdint.h> #include <math.h> #include "core.h" #include "imcore.h" // struct to keep four neighbours of the (i,j) and itself struct sparse_element { int index[5]; float value[5]; }; // set the circular poission matrix elements void fill_poisson_...
// Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may...
/* * Copyright (C) 2017 <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 retain the above copyright * notice, this list of conditions and the followi...
/* * Copyright (c) 2019-2020 vanaur. * * This file is part of RCL * (see https://github.com/vanaur/The-Runtime-Core-Library). * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * r...
/****************************************************************************** * Copyright (C) 2009 <NAME>. 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 witho...
#include "lib.h" #include <mmu.h> #include <env.h> #include <kerelf.h> #define debug 0 #define TMPPAGE (BY2PG) #define TMPPAGETOP (TMPPAGE+BY2PG) int init_stack(u_int child, char **argv, u_int *init_esp) { int argc, i, r, tot; char *strings; u_int *args; // Count the number of arguments (argc) // and the total...
#include "Memhex_read.h" static const char this_file_name [] = "test_dram_dma_hwsw_cosim.c"; // ---------------- // Forward decls of functions int peek_poke_example(uint32_t value, int slot_id, int pf_id, int bar_id); int load_mem_hex32_using_DMA (int slot_id, char *filename); int debug_server (int slot_id, int pf_i...
/* spawn.c Spawn a program securely. Copyright (C) 1992 <NAME> This file is part of the Taylor UUCP package. 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 th...
/* * Copyright (c) 2016 <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, dis...
/* * Copyright (c) 2000, 2002, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free ...
/* * memorymap.c * * Created on: Nov 22, 2019 * Author: cburke */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> #include "memorymap.h" void mm_init(MemoryMap* map, int mapSize, char *id) { // WARNING: id might be an ephemeral string; copy if needed // Try to allocate memo...
#include "spacerocks/saucer.h" static const float big_saucer_scale = 20.0f; static const float small_saucer_scale = 10.0f; const Lines saucer_lines = { { {0.2f, -0.6f}, {0.4f, -0.2f}, {0.4f, -0.2f}, {1.0f, 0.2f}, {1.0f, 0.2f}, {0.4f, 0.6f}, {0.4f, 0.6f}, ...