text stringlengths 3.08k 10.5k |
|---|
/*
MIT License
Copyright (c) 2018 <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... |
/* security.c -- manage access to files and audio */
/* <NAME>
* July 2014
*/
#include <stdlib.h>
#ifndef WIN32
#include <unistd.h>
#endif
#include <string.h>
#include <xlisp.h>
static void find_full_path(const char *filename, char *fullname);
static int in_tree(const char *fullname, char *secure_read_path);
static... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <arpa/inet.h>
#include <math.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <ctype.h>
#define PORT1 55666
#define PORT2 55667
#define PORT3 55668
#define ... |
/* **********************************************************
* Copyright (c) 2012-2014 Google, Inc. All rights reserved.
* Copyright (c) 2006-2010 VMware, Inc. All rights reserved.
* **********************************************************/
/*
* Redistribution and use in source and binary forms, with or witho... |
/* Socket Feeder
* --------------
*
* This application shall read content from a file and pass it through a socket
* so that on the other side a lexical analyzer may listen on the socket and
* directly examine it.
*
*
* socket feeder lexer-socket
* .-----------------... |
#pragma once
#include "../base/allocator.h"
#include "stringview.h"
#if !defined(string_defaultcapacity)
#define string_defaultcapacity 32
#endif
#define string_null (string){.data = NULL, .capacity = 0, .size = 0}
#define string_copy(s, from, size) \
_Generic((from), \
string: _string_... |
/*
* Copyright (c) 2014 DeNA Co., Ltd.
*
* 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, publ... |
/*
*
***** BEGIN LICENSE BLOCK *****
Copyright (C) 2009-2019 <NAME> and <NAME>
This file is part of CLIXON.
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... |
//Liang-Barsky Line Clipping Algorithm
//Header files for initialization - (given)
#include<stdio.h>
#include<stdlib.h>
#include<GL/glut.h>
#include<limits.h> //for slope condition
//simple function to print the lines
void line(float x1, float y1, float x2, float y2)
{
glBegin(GL_LINES);
glVertex2f(x1, y1);
glVert... |
/******************************************************************************
* Test/tht/lichter_test.c *
* ======================= *
* *
... |
/*
* NOTE thqt this program does not support reading input from character device
*/
#define _GNU_SOURCE /* For loff_t */
#define _LARGEFILE64_SOURCE /* For lseek64 */
#include <liburing.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <fcntl.h>
#include <err.h>
#include <stdio.h>
#inclu... |
/* 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 not... |
/***********************************************/
/* File: retinf.c */
/* Author: <NAME> */
/* Contact: <EMAIL> */
/* License: Copyright (c) 2018 <NAME> */
/***********************************************/
/* retinf.c AXL分析器 */
#include <stdio... |
/**
* @file avltest.c
* @author <NAME>
*
*/
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <stddef.h>
#include <assert.h>
#include "avltree.h"
struct area {
long addr;
long size;
struct avlnode node;
};
typedef int(*node_callback_fn)(const struct avlnode *n, void *ptr);
#define avlnod... |
// gcc -o drm-gbm drm-gbm.c -ldrm -lgbm -lEGL -lGL -I/usr/include/libdrm
// general documentation: man drm
#include <xf86drm.h>
#include <xf86drmMode.h>
#include <gbm.h>
#include <EGL/egl.h>
#include <GL/gl.h>
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdio.h>
#define EXIT(msg) { fputs (m... |
#include<stdio.h>
#include<stdint.h>
#include<stdlib.h>
#include<string.h>
#include<limits.h>
#include<inttypes.h>
#define WordSize 32
#define TotalOctets 64
#define TotalBits 512
uint64_t ceiling(uint64_t x)
{
uint64_t res=(x%TotalBits==0) ? (x/TotalBits) : (x/TotalBits)+1;
return(res);
}
uint32_t rotl(uint32_t v... |
/*******************************************************************************************
*
* raylib [others] example - 3d instancing testbed
*
********************************************************************************************/
#include "raylib.h"
#include "rlgl.h"
#include "camera_first_person.h"
// R... |
//
// main.c
// testes
//
// Created by <NAME> on 20/06/17.
// Copyright © 2017 <NAME>. All rights reserved.
//
#include <stdio.h>
#include <string.h>
struct funcionarios { // cria um struct com as opcoes {codigo,nome,funcao,departamento,salario}
int codigo;
char nome[30]; // o nome do funcionario pode te... |
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#define MAXATOMS 200
#define MAXISO 20
#define BSIZE 1024
double masses[MAXATOMS][MAXISO];
int imasses[MAXATOMS][MAXISO];
double abands[MAXATOMS][MAXISO];
char symbols[MAXATOMS][10];
int z[MAXATOMS];
int nIso[MAXATOMS];
double sumAband[MAXA... |
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <pthread.h>
#include <semaphore.h>
#define MAX_STUDENT 100 // Student count at library
#define CLASSRO0M 10 // Classroom count at library
#define WORKTABLE 4 // Each classroom has 4 worktable
/* Defined color printing globals*/
#define ANSI_C... |
#pragma once
typedef struct {
char year[4];
char month[2];
char day[2];
char hour[2];
char minute[2];
char second[2];
char hundredths[2];
int8_t timezone;
} __attribute__((packed)) iso_9660_datetime_t;
typedef struct {
uint8_t year;
uint8_t month;
uint8_t day;
uint8_t hour;
uint8_t minute;
uint8_t secon... |
/* $XConsortium: DefErrMsg.c,v 1.10 94/04/17 20:15:57 rws Exp $ */
/*
Copyright (c) 1988 X Consortium
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 limi... |
/*
* Copyright (c) 1995, 1996, 1997 Carnegie-Mellon University.
* All rights reserved.
*
* Author: <NAME>
*
* Permission to use, copy, modify and distribute this software and
* its documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
... |
/* *****************************************************************************
* Copyright (C) 2016 Maxim Integrated Products, Inc., 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 ... |
#include "main/shmem/shmem_file.h"
#include <assert.h>
#include <errno.h>
#include <inttypes.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <fcntl.h>
#include <sys/mman.h>
#include <sys/param.h>
#include <sys/stat.h... |
/* $OpenBSD: explicit_bzero.c,v 1.5 2014/07/11 00:38:17 matthew Exp $ */
/*
* Copyright (c) 2014 Google Inc.
*
* Permission to use, copy, modify, and 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... |
/*
Based on zlib license - see http://www.gzip.org/zlib/zlib_license.html
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for a... |
/******************************************************************************
* struct message_helper
* Assists in sending and receiving messages.
******************************************************************************/
struct message_helper {
unsigned char data_type;
unsigned short data_len;
// Hea... |
/*
* Copyright (c) 2003 <NAME> <<EMAIL>>
* Copyright (c) 2008 <NAME> <<EMAIL>>
* Copyright (c) 2010 <NAME> <<EMAIL>>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice app... |
#include "initLB.h"
#include "helper.h"
#include "LBDefinitions.h"
int readParameters(int *xlength, double *tau, double *velocityWall, int *timesteps, int *timestepsPerPlotting, int argc, char *argv[])
{
const char * filename = argv[1];
double velocityWallX;
double velocityWallY;
double velocityWallZ;
/* Make su... |
/*
* plus4acia.c - Definitions for a 6551 ACIA interface
*
* Written by
* <NAME> <<EMAIL>>
* <NAME> <<EMAIL>>
* Groepaz <<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 redistribut... |
/*
* Copyright (c) 2013 <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 must retain the above copyright notice,
* this list of conditions an... |
/* Author: Romain "Artefact2" <NAME> <<EMAIL>> */
/* This program is free software. It comes without any warranty, to the
* extent permitted by applicable law. You can redistribute it and/or
* modify it under the terms of the Do What The Fuck You Want To Public
* License, Version 2, as published by Sam Hocevar. See... |
//
// Created by rajashekhar on 22/10/20.
//
#include <stdio.h>
#include <string.h>
/* Contains necessary C functions of mysql */
#include <mysql/mysql.h>
/**
* Holds the info to connect to DB and
* error specifying function for
* database connection handle
*/
#include "connector.h"
#define STRING_SIZE 100
#def... |
#include "main.h"
#include "config.h"
extern ntrConfig_t *ntrConfig;
extern bootNtrConfig_t *bnConfig;
extern char *g_primary_error;
extern char *g_secondary_error;
extern char *g_third_error;
#define RELOC_COUNT 9
#define BASE 0x100100
enum
{
BINARY = 0,
... |
// C Source File
// Created 11/15/03; 4:49:22 PM
#define USE_TI89 // Compile for TI-89
#define OPTIMIZE_ROM_CALLS // Use ROM Call Optimization
#define SAVE_SCREEN // Save/Restore LCD Contents
#include <tigcclib.h> // Include All Header Files
#include "gunner.h"
INT_HANDLER interru... |
/******************************************************************************
Copyright (C) 2014 by <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... |
/* GOST 28147-89 (Magma) implementation
*
* Copyright: 2015, 2016 <NAME> <<EMAIL>>
* Copyright: 2009-2012 <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 res... |
#define SIG SIGUSR1
static int
do_sendmsg(int sock, int fd)
{
struct msghdr msg;
struct cmsghdr *cmsghdr;
struct iovec iov[1];
ssize_t nbytes;
int i, *p;
char buf[CMSG_SPACE(sizeof(int))], c;
c = '*';
iov[0].iov_base = &c;
iov[0].iov_len = sizeof(c);
memset(buf, 0x0b, sizeof(buf));
cmsghdr = (struct cmsgh... |
#include "rfm9x_lora.h"
const uint8_t RFM9X_READ = 0x00;
const uint8_t RFM9X_WRITE = 0x80;
const uint8_t RFM9X_REG_FIFO = 0x00;
const uint8_t RFM9X_REG_MODE = 0x01;
const uint8_t RFM9X_REG_PA_CONFIG = 0x09;
const uint8_t RFM9X_REG_FIFO_ADDR_PTR = 0x0D;
const uint8_t RFM9X_REG_FIFO_TX_BASE_ADDR = 0x0E;
const uint8_t R... |
/* RetroArch - A frontend for libretro.
* Copyright (C) 2011-2017 - <NAME>
*
* RetroArch 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 Found-
* ation, either version 3 of the License, or (at your option) any lat... |
/* sbuslib.c: Helper library for SBUS framebuffer drivers.
*
* Copyright (C) 2003 <NAME> (<EMAIL>)
*/
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/string.h>
#include <linux/fb.h>
#include <linux/mm.h>
#include <asm/oplib.h>
#include <asm/fbio.h>
#include "sbuslib.h"
void sbusfb_fill_var(st... |
// SPDX-License-Identifier: GPL-2.0
//
// Driver for LNB supply and control IC STMicroelectronics LNBH29
//
// Copyright (c) 2018 Socionext Inc.
#include <linux/module.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <media/dvb_frontend.h>
#include "lnbh29.h"
/**
* struct lnbh29_priv - LNBH29 driver priv... |
/*
* Copyright (c) 2005-2009 Hypertriton, Inc. <http://hypertriton.com/>
* 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 copyrigh... |
/*
* Copyright (c) 2003-2005 Hewlett-Packard Development Company, L.P.
* Original Author: <NAME>
*
* This file may be redistributed and/or modified under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2, or (at your option) any later version.
*
* It ... |
/*
*
* GattLib - GATT Library
*
* Copyright (C) 2016 <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
* (at your option) ... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/stat.h>
#define HEAD "HTTP/1.0 200 OK\n\
Content-Type: %s\n\
Transfer-Encoding: chunked\n\
Connection: Keep-Alive\n\
Accept-Ranges:bytes\n\
Content-Length:%d\n\n"
#define TAIL "... |
#include "editor.h"
#include "text_processing.h"
void console_init(Content* content)
{
}
void console_close(Content* content)
{
}
void console_update(Window* window)
{
v4 b = window->bounds;
ConsoleData* console = &window->content->data.console;
v4 text_bounds = console_text_bounds(window);
v4 command_bounds ... |
#include "axi_lite_driver.h"
#include <generated/mem.h>
#include "config_spam_filter_small.h"
//width of a packet is 49 bits
//bft2arm_packet = {1'b1, SLV_REG1[15:0], SLV_REG0[31:0]}
//arm2bft_packet = {SLV_REG5[16:0], SLV_REG4[31:0]}
//input fifo empty = SLV_REG3[1]
//output fifo full = SLV_REG3[0]
//input fifo rd_en... |
/* Tests for res_hnok and related functions.
Copyright (C) 2017-2020 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C 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 Softw... |
/*
* Copyright (c) 2013-2015 <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,
* publ... |
/*
* =============================================================================
* HSA Runtime Conformance Release License
* =============================================================================
* The University of Illinois/NCSA
* Open Source License (NCSA)
*
* Copyright (c) 2014, Advanced Micro Devi... |
#include <acpi.h>
#include <acpi/tables.h>
#include <apic.h>
#include <stdint.h>
#include <print.h>
#include <acpi/aml/interpreter.h>
#define ACPI_EBDA_ADDRESS 0x40E
#define ACPI_SIGNATURE_MADT "APIC"
#define ACPI_SIGNATURE_FADT "FACP"
#define ACPI_SIGNATURE_DSDT "DSDT"
#define ACPI_SIGNATURE_SSDT "SSDT"
... |
// Porres 2017
#include "m_pd.h"
#include "math.h"
#include "string.h"
#define TWOPI (3.14159265358979323846 * 2)
static t_class *xmod_class;
typedef struct _xmod{
t_object x_obj;
double x_phase_1;
double x_phase_2;
t_float x_pm;
t_float x_yn;
t_float x_freq;
t_i... |
/*-
* Copyright (c) 2010 <NAME>
* Copyright (c) 1998, 2010 <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
* ... |
#include <stdio.h>
#include "myutils.h"
int ERRNO_get(unsigned int err, char * dst_buffer, unsigned int dst_buffer_len)
{
int ret = RET_OK;
if ( dst_buffer_len < 0 ) {
ret = RET_ILLEGAL_BUFFER_LEN;
goto fin;
}
switch(err)
{
case 0:
// int snprintf ( char * s, size_t n, cons... |
/*
* translate.c
*
* Created on: Feb 13, 2016
* Author: David
*/
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
#include "translate.h"
#include "file.h"
void initTable()
{
int i, j, k, num = 30;
for(i = 0; i < 4; i++)
{
for(j = 0; j < 4; j++)
{
for(k = 0; k < 4; k++)... |
/*
* pg_statsinfo.c
*
* Copyright (c) 2009-2017, NIPPON TELEGRAPH AND TELEPHONE CORPORATION
*/
#include "pg_statsinfo.h"
const char *PROGRAM_VERSION = "3.2.3";
const char *PROGRAM_URL = "http://pgstatsinfo.sourceforge.net/";
const char *PROGRAM_EMAIL = NULL;
static bool mode_list;
static bool mode_size;... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "util.h"
#include "symbol.h"
#include "temp.h"
#include "assem.h"
#include "color.h"
#include "flowgraph.h"
#include "liveness.h"
#include "regalloc.h"
#include "table.h"
#include "errormsg.h"
#include "options.h"
#include "linscan.h"
// #define ENAB... |
#include <tests.h>
#include <common.h>
#include <lld_steer_angle_fb.h>
/*============================================================================*/
/* FILTER CONFIGURATION */
/*============================================================================*/
#def... |
// This is a personal academic project. Dear PVS-Studio, please check it.
// PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
#include <syscalls.h>
#include <stdint.h>
#include <console.h>
#define SYSCALL_COUNT 14
// Software handlers functions
static uint64_t syscall_00 (uint64_t rdi, uint64... |
/*
* Copyright 1993-2002 <NAME> and Perforce Software, Inc.
*
* This file is part of Jam - see jam.c for Copyright information.
*/
/* This file is ALSO:
* Copyright 2001-2004 <NAME>.
* Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or http://www.boost.org... |
/**************************************************************************
* Copyright (c) 2001, 2003 by <NAME>. All rights reserved. *
* *
* Redistribution and use in source and binary forms, with or without *
* modification, are permi... |
/*****************************************************
Project : LED CUBE 555
Version : 1.0
Date : 20-Jan-2018
Author : <NAME>
Company : Home
Comments: Prepare for TET holiday 2018
Chip type : ATmega16
Program type : Application
AVR Core Clock frequency: 14.745600 MHz
Memory model ... |
/***************************************************************************/
/* */
/* cffdecode.c */
/* */
/* Po... |
// 把数组num_in_rank、num_in_suit和card_exists从10.5节的poker.c程序中去掉。
// 程序改用5×2的数组来存储牌。数组的每一行表示一张牌。
// 例如,如果数组名为hand,则hand[0][0]存储第一张牌的等级,hand[0][1]存储第一张牌的花色。
/* Classifies a poker hand */
#include <stdbool.h> /* C99 only */
#include <stdio.h>
#include <stdlib.h>
#define RANK 0
#define SUIT 1
#define NUM_CARDS 5
/* external ... |
/*
* This file is responsible for drawing sprites and particles on
* the screen. No depth buffer is used and sprites are drawn top
* to bottom. The rendering pipeline starts with rendering world
* sprites mixed with particles on their respective layers. Then
* the camera is set to the UI mode and UI sprites are drawn.
... |
/*************************************************************************
* icadata.c
*
* This module declares global data for Termdd
*
* Copyright (C) 1997-1999 Microsoft Corp.
*************************************************************************/
/*
* Includes
*/
#include <precomp.h>
#pragma hdrs... |
/*
* $QNXLicenseC:
* Copyright 2009, QNX Software Systems.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You
* may not reproduce, modify or distribute this software except in
* compliance with the License. You may obtain a copy of the License
* at: http://www.apache.org/licenses/LICENSE-2.0... |
/******************************************************************************
* RGBLED library
* Copyright (C) 2018 <NAME>
*
* Authors:
* <NAME> <<EMAIL>>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), t... |
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "drm/drm.h"
#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
#include <unistd.h>
#include <jni.h>
const char drm_dev_name[] = "/dev/dri/card0";
char out_str[8192];
char *out_ptr = &out_str[0];... |
/* -*- Mode: C; c-basic-offset:4 ; -*- */
/*
* $Id$
*
* Copyright (C) 1997 University of Chicago.
* See COPYRIGHT notice in top-level directory.
*/
#include "mpioimpl.h"
#ifdef HAVE_WEAK_SYMBOLS
#if defined(HAVE_PRAGMA_WEAK)
#pragma weak MPI_File_read_shared = PMPI_File_read_shared
#elif defined(HAV... |
#include <stdbool.h>
#include <stdint.h>
#include <string.h>
#include "inc/hw_ints.h"
#include "inc/hw_memmap.h"
#include "inc/hw_types.h"
#include "inc/hw_gpio.h"
#include "inc/hw_uart.h"
#include "inc/hw_sysctl.h"
#include "driverlib/debug.h"
#include "driverlib/fpu.h"
#include "driverlib/gpio.h"
#inclu... |
// CorePaycoin by <NAME> <<EMAIL>>, WTFPL.
#import <Foundation/Foundation.h>
// Change to 0 to disable code that requires OpenSSL (if you need some of these routines in your own project and you don't need OpenSSL)
#define XPYDataRequiresOpenSSL 1
// Securely overwrites memory buffer with a specified character.
void ... |
/*
* $QNXLicenseC:
* Copyright 2007, 2008, QNX Software Systems.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You
* may not reproduce, modify or distribute this software except in
* compliance with the License. You may obtain a copy of the License
* at: http://www.apache.org/lic... |
/*
Copyright (c) 2015, Plume Design 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 list of conditions and the... |
/*
* This program reverses an array in groups of a given size k. For
* more information on this post please refer to the following link:-
* http://www.geeksforgeeks.org/reverse-an-array-in-groups-of-given-size/
*/
#include<stdio.h>
#include<string.h>
#include<assert.h>
/*
* This function reverses a section of an ... |
#include <mem/palloc.h>
#include <bitmap.h>
#include <type.h>
#include <round.h>
#include <mem/mm.h>
#include <synch.h>
#include <device/console.h>
#include <mem/paging.h>
#include <mem/swap.h>
#define KERNEL_BITS 736 // bitmap이 쓰는 page 크기 제외
#define USER_BITS 7200 // bitmap이 쓰는 page 크기 제외
/*
Page allocator. Ha... |
/*!
*****************************************************************************
* @file: main.c
* @brief: Main source file
* @version: $Revision$
* @date: $Date$
*-----------------------------------------------------------------------------
*
Copyright (c) 2015-2017 Analog Devices, Inc.
All rights res... |
#include "boot.h"
#include "squeeze.h"
#define EXECHDRLEN (8*4)
typedef struct Squeeze Squeeze;
struct Squeeze {
int n;
ulong tab[7*256];
};
#define GET4(p) (((((((p)[0]<<8)|(p)[1])<<8)|(p)[2])<<8)|(p)[3])
/*
* for speed of unsqueezing from Flash, certain checks are
* not done inside the loop (as they would be ... |
/*********************************************************************
* Copyright 2010, UCAR/Unidata
* See netcdf/COPYRIGHT file for copying and redistribution conditions.
* $Header$
*********************************************************************/
#include "config.h"
#include <stdlib.h>
#ifdef HAVE_UN... |
#include "common.h"
/* Test for SQLPutData */
static const char test_text[] =
"Nel mezzo del cammin di nostra vita\n" "mi ritrovai per una selva oscura\n" "che' la diritta via era smarrita.";
#define BYTE_AT(n) (((n) * 245 + 123) & 0xff)
static int
to_sqlwchar(SQLWCHAR *dst, const char *src, int n)
{
int i;
for ... |
#include "mygpio.h"
#include <drivers/gpio.h>
#include <logging/log.h>
LOG_MODULE_DECLARE(myhttpserver, LOG_LEVEL_DBG);
struct output_struct outputs[NUM_OUTPUTS] = {0};
struct input_struct inputs[NUM_INPUTS] = {0};
static struct gpio_callback input_cb_data;
static void(*listener_callback)(const char*, uint8_t) = NUL... |
// 千本桜(配信用)112
#define NOTE_A1 55//ラ
#define NOTE_AS1 58
#define NOTE_B1 62//シ
#define NOTE_C2 65//ド
#define NOTE_CS2 69
#define NOTE_D2 73//レ
#define NOTE_DS2 78
#define NOTE_E2 82//ミ
#define NOTE_F2 87//ファ
#define NOTE_FS2 92
#define NOTE_G2 98//ソ
#define NOTE_GS2 104 //半音上げ
#define NOTE_A2 110//ラ
#define NO... |
#ident "@(#) $Id: main.c,v 1.1 2012/12/06 16:36:26 jdavid Exp $"
/* Copyright (c) 2010, <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 must retain t... |
// ptest.c - Simple particles example using the OpenVG Testbed
// via <NAME> (github.com/nilliams)
// https://gist.githubusercontent.com/nilliams/7705819/raw/9cbb5a1298d6eef858639095148ede2c33cb6d40/particles.c
//
// Modified by paeryn (<EMAIL>) to create particles as path
// objects.
//
// Usage: ./particles [OPTIONS]... |
/**
* @file polling.c
* @author <NAME> (<EMAIL>)
* @brief Poll gamepad for new data when in polling acquisiton mode.
* @date 2022-02-20
*
* @copyright Copyright (C) 2022 <NAME>
*
* SPDX-License-Identifier: Apache-2.0
*
*/
#include <zephyr.h>
#include <wii.h>
#include <device.h>
#include <sys/util.h>
#inclu... |
/*
Unix SMB/Netbios implementation.
Version 1.9.
NT Domain Authentication SMB / MSRPC client
Copyright (C) <NAME> 1994-1997
Copyright (C) <NAME> 1996-1997
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
... |
#include "gbalib.h"
#include "place.h"
#include "gameboard.h"
#include "pentomino.h"
#include "dashboard.h"
#include "main.h"
#define D_SCORE_SOFT_DROP 1
#define D_SCORE_HARD_DROP 2
static PENTOMINO current;
static PENTOMINO prev;
// Used to force the tile to be commited after we draw it if the player
// preformed a... |
/******************************************************************************
* Copyright (c) 2017, NXP Semiconductors
* 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. Redistributio... |
#define _GNU_SOURCE 1
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <assert.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
#include <fcntl.h>
#include <sys/epoll.h>
#define SIZE 1024
#define USER_LIMI... |
/******************************************************************************
* Spine Runtimes Software License
* Version 2
*
* Copyright (c) 2013, Esoteric Software
* All rights reserved.
*
* You are granted a perpetual, non-exclusive, non-sublicensable and
* non-transferable license to install, execute an... |
/* GLIB - Library of useful routines for C programming
* Copyright (C) 1995-1997 <NAME>, <NAME> and <NAME>
*
* gthread.c: solaris thread system implementation
* Copyright 1998 <NAME>; University of Karlsruhe
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU... |
/* Sep 26th 2001
Interface to the Internet Configuration toolkit
<NAME> of Corporate Smalltalk Consulting Ltd
<EMAIL>
http://www.smalltalkconsulting.com
Nov 24th 2001 JMM fixed broken tempSpec code, was causing memory exception under os-x
3.7.0bx Nov 24th, 2003 JMM gCurrentVMEncoding
3.8.1... |
/*
* Open Chinese Convert
*
* Copyright 2010 BYVoid <<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 applic... |
#include <stdio.h>
#include <stdlib.h>
struct node {
int valor;
struct node *anterior;
struct node *proximo;
} node;
struct node *head;
int length() {
int size = 0;
if (head != 0) {
struct node *auxNode = head;
while (auxNode != 0) {
auxNode = auxNode -> proximo;
... |
/*************************************************************************************************************
Copyright 2015-2019, Silicon Laboratories, Inc.
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 Li... |
// Copyright (C) 2014 <NAME> <<EMAIL>>
//
// This file is part of SCSI2SD.
//
// SCSI2SD 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 yo... |
#include "mruby.h"
#include "mruby/variable.h"
#include "mruby/hash.h"
#include "rtosif.h"
/*
* call-seq:
* Semaphore.new(id=nil, max=1, init=1, *modes) # => Semaphore
*
* Creates Semaphore object.
*
* Parameters:
* +id+ Event flag ID
* nil Assign ID automatically.
* +max+ Maximum... |
/*
* This file is part of the coreboot project.
*
* Copyright (C) 2010 <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; version 2 of the License.
*
* This program is d... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.