repo_name stringlengths 5 122 | path stringlengths 3 232 | text stringlengths 6 1.05M |
|---|---|---|
i-vishi/ds-and-algo | Sort - Selection/C/selectionSort.c | /* Author: <NAME>
* Created: 03-01-2021 22:02:06
*/
#include <stdio.h>
// function to sort an array using selection sort
void selectionSort(int a[], int n)
{
for (int i = 0; i < n - 1; i++)
{
int minIdx = i;
for (int j = i + 1; j < n; j++)
{
if (a[j] < a[minIdx])
minIdx = j;
}
... |
i-vishi/ds-and-algo | Search - Linear/C/linearSearch.c | /* Author: <NAME>
* Created: 03-01-2021 21:09:12
*/
#include <stdio.h>
// function to search an element using linear seaching
int linearSearch(int a[], int n, int x)
{
for (int i = 0; i < n; i++)
{
if (a[i] == x)
return i;
}
return -1;
}
// main function to test above function
int main()
{
... |
i-vishi/ds-and-algo | Sort - Insertion/C/insertionSort.c | /* Author: <NAME>
* Created: 03-01-2021 21:47:23
*/
#include <stdio.h>
// function to sort an array using insertion sort
void insertionSort(int a[], int n)
{
for (int i = 1; i < n; i++)
{
for (int j = i; j > 0; j--)
{
if (a[j - 1] > a[j])
{
int tmp = a[j];
a[j] = a[j - 1];
... |
i-vishi/ds-and-algo | Search - Binary/C/binarySearch.c | /* Author: <NAME>
* Created: 02-01-2021 14:07:21
*/
#include <stdio.h>
// function to search an element using binary seaching
int binarySearch(int a[], int n, int x)
{
int st = 0, ed = n - 1;
while (st <= ed)
{
int mid = st + (ed - st) / 2;
if (a[mid] == x)
return mid;
if (a[mid] < x)
... |
i-vishi/ds-and-algo | DP - Rod Cutting/C/rodCutting.c | /* Author: <NAME>
* Created: 04-01-2021 20:32:21
*/
#include <stdio.h>
// function to find best obtainable price
int rodCutting(int values[], int n)
{
int pro[n + 1];
pro[0] = 0;
for (int i = 1; i <= n; i++)
{
int mx = -1;
for (int j = 0; j < i; j++)
{
int sm = values[j] + pro[i - j - 1]... |
i-vishi/ds-and-algo | Sort - Bubble/C/bubbleSort.c | <reponame>i-vishi/ds-and-algo
/* Author: <NAME>
* Created: 01-01-2021 13:15:32
*/
#include <stdio.h>
// function to sort an array using bubble sort
void bubbleSort(int a[], int n)
{
for (int i = 0; i < n - 1; i++)
{
for (int j = 0; j < n - i - 1; j++)
{
if (a[j] > a[j + 1])
{
int t... |
i-vishi/ds-and-algo | Hello World/C/hello.c | <gh_stars>1-10
/* Author: <NAME>
* Created: 01-01-2021 13:02:07
*/
#include <stdio.h>
int main()
{
printf("Hello World\n");
return 0;
} |
i-vishi/ds-and-algo | GCD - Euclidean (Basic)/C/gcdEuclid.c | <reponame>i-vishi/ds-and-algo
/* Author: <NAME>
* Created: 23-01-2021 21:50:34
*/
#include <stdio.h>
// function to find GCD using Basic Euclidean Algorithm
int gcdEuclid(int a, int b)
{
if (a == 0)
return b;
else
return gcdEuclid(b % a, a);
}
// main function to test above function
int main()
{
i... |
abs-tudelft/fletcher-snap | examples/stringwrite/sw/snap_stringwrite.c | <filename>examples/stringwrite/sw/snap_stringwrite.c
#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <string.h>
#include <errno.h>
#include <malloc.h>
#include <unistd.h>
#include <sys/time.h>
#include <getopt.h>
#include <ctype.h>
#include <libsnap.h>
#include <snap_tools.h>... |
alexwinger/bottle_filler | FlowMeter.h | /*
*
*
*/
#ifndef _FLOW_METER_
#define _FLOW_METER_
class flow_meter
{
static flow_meter *instance;
int sensor_pin;
volatile int pulse_count;
static void count_pulses();
public:
flow_meter(int input_pin);
};
#endif |
catroll/mailx | src/su/prime.c | /*@ Implementation of prime.h.
*
* Copyright (c) 2001 - 2020 <NAME>) Nurpmeso <<EMAIL>>.
* SPDX-License-Identifier: ISC
*
* 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 noti... |
catroll/mailx | src/mx/imap-search.c | <filename>src/mx/imap-search.c
/*@ S-nail - a mail user agent derived from Berkeley Mail.
*@ Client-side implementation of the IMAP SEARCH command. This is used
*@ for folders not located on IMAP servers, or for IMAP servers that do
*@ not implement the SEARCH command.
*
* Copyright (c) 2000-2004 <NAME>, Freiburg ... |
catroll/mailx | src/mx/file-locks.c | /*@ S-nail - a mail user agent derived from Berkeley Mail.
*@ Implementation of file-locks.h.
*
* Copyright (c) 2015 - 2020 <NAME>) Nurpmeso <<EMAIL>>.
* SPDX-License-Identifier: ISC
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, prov... |
catroll/mailx | include/mx/mime-type.h | <gh_stars>1-10
/*@ S-nail - a mail user agent derived from Berkeley Mail.
*@ MIME types: handlers, `mimetype', etc.
*
* Copyright (c) 2012 - 2020 Steffen (Daode) Nurpmeso <<EMAIL>>.
* SPDX-License-Identifier: ISC
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or witho... |
catroll/mailx | src/mx/accmacvar.c | <gh_stars>1-10
/*@ S-nail - a mail user agent derived from Berkeley Mail.
*@ Account, macro and variable handling; `vexpr' and `vpospar'.
*@ HOWTO add a new non-dynamic boolean or value option:
*@ - add an entry to nail.h:enum okeys
*@ - run make-okey-map.pl (which is highly related..)
*@ - update the manual!
*@ ... |
catroll/mailx | include/mx/nailfuns.h | /*@ S-nail - a mail user agent derived from Berkeley Mail.
*@ Function prototypes and function-alike macros.
*@ TODO Should be split in myriads of FEATURE-GROUP.h headers.
*
* Copyright (c) 2000-2004 <NAME>, Freiburg i. Br., Germany.
* Copyright (c) 2012 - 2020 <NAME> <<EMAIL>>.
* SPDX-License-Identifier: BSD-3-C... |
catroll/mailx | src/mx/cmd-vexpr.c | <filename>src/mx/cmd-vexpr.c
/*@ S-nail - a mail user agent derived from Berkeley Mail.
*@ Implementation of cmd-vexpr.h.
*@ TODO - better commandline parser that can dive into subcommands could
*@ TODO get rid of a lot of ERR_SYNOPSIS cruft.
*@ TODO - use su_regex (and if it's a wrapper only)
*@ TODO - use su_p... |
catroll/mailx | src/su/avopt.c | /*@ Implementation of avopt.h.
*
* Copyright (c) 2001 - 2020 <NAME> <<EMAIL>>.
* SPDX-License-Identifier: ISC
*
* 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 ... |
catroll/mailx | src/mx/main.c | /*@ S-nail - a mail user agent derived from Berkeley Mail.
*@ Startup and initialization.
*@ This file is also used to materialize externals.
*@ TODO we need a program wide global ctx; furtherly split main();
*@ TODO when arguments are parsed the a_main_ctx instance should be dropped
*
* Copyright (c) 2012 - 2020... |
catroll/mailx | include/mx/gen-version.h | <gh_stars>0
#define mx_VERSION "v14.9.23"
#define mx_VERSION_DATE "2021-11-11"
#define mx_VERSION_MAJOR "14"
#define mx_VERSION_MINOR "9"
#define mx_VERSION_UPDATE "23"
#define mx_VERSION_HEXNUM "0x0E009017"
|
catroll/mailx | src/mx/random.c | <gh_stars>1-10
/*@ S-nail - a mail user agent derived from Berkeley Mail.
*@ Implementation of random.h.
*
* Copyright (c) 2015 - 2020 <NAME>) Nurpmeso <<EMAIL>>.
* SPDX-License-Identifier: ISC
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby gr... |
catroll/mailx | src/mx/file-streams.c | /*@ S-nail - a mail user agent derived from Berkeley Mail.
*@ Implementation of file-streams.h.
*@ TODO tmp_release() should be removed: tmp_open() should take an optional
*@ TODO vector of NIL terminated {char const *mode;sz fd_result;} structs,
*@ TODO and create all desired copies; drop HOLDSIGS, then, too!
*
... |
catroll/mailx | src/mx/send.c | <gh_stars>1-10
/*@ S-nail - a mail user agent derived from Berkeley Mail.
*@ Message content preparation (sendmp()).
*
* Copyright (c) 2000-2004 <NAME>, Freiburg i. Br., Germany.
* Copyright (c) 2012 - 2020 <NAME>) Nurpmeso <<EMAIL>>.
* SPDX-License-Identifier: BSD-3-Clause
*/
/*
* Copyright (c) 1980, 1993
* ... |
catroll/mailx | src/mx/net-socket.c | /*@ S-nail - a mail user agent derived from Berkeley Mail.
*@ Socket operations.
*
* Copyright (c) 2000-2004 <NAME>, Freiburg i. Br., Germany.
* Copyright (c) 2012 - 2020 <NAME>) Nurpmeso <<EMAIL>>.
* SPDX-License-Identifier: BSD-3-Clause
*/
/*
* Redistribution and use in source and binary forms, with or without... |
catroll/mailx | src/mx/dig-msg.c | <reponame>catroll/mailx
/*@ S-nail - a mail user agent derived from Berkeley Mail.
*@ Dig message objects. TODO Very very restricted (especially non-compose)
*@ Protocol change: adjust mx-config.h:mx_DIG_MSG_PLUMBING_VERSION + `~^' man.
*@ TODO - a_dmsg_cmd() should generate string lists, not perform real I/O.
*@ T... |
catroll/mailx | src/mx/sendout.c | <gh_stars>1-10
/*@ S-nail - a mail user agent derived from Berkeley Mail.
*@ Message sending lifecycle, header composing, etc.
*
* Copyright (c) 2000-2004 <NAME>, Freiburg i. Br., Germany.
* Copyright (c) 2012 - 2020 <NAME>) Nurpmeso <<EMAIL>>.
* SPDX-License-Identifier: BSD-3-Clause
*/
/*
* Copyright (c) 1980, ... |
Jack957/BigNumber | src/bignumber.h | /*
* The MIT License (MIT)
*
* Copyright (c) 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, mo... |
shadow-of-arman/UIButtonExtension | UIButtonExtension/UIButtonExtension.h | //
// UIButtonExtension.h
// UIButtonExtension
//
// Created by <NAME> on 9/28/20.
//
#import <Foundation/Foundation.h>
//! Project version number for UIButtonExtension.
FOUNDATION_EXPORT double UIButtonExtensionVersionNumber;
//! Project version string for UIButtonExtension.
FOUNDATION_EXPORT const unsigned char... |
wodely/ASAlterView | ASAlterView/Classes/ASAlertControllerTool.h | <reponame>wodely/ASAlterView<gh_stars>0
//
// ASAlertControllerTool.h
// hxxdj
//
// Created by 刘 on 2019/5/17.
// Copyright © 2019 aisino. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
typedef void (^ActionBlock)(NSInteger buttonIndex);
typedef void (^CancelBlock)();
NS_ASSUME_... |
carlosmouracorreia/AlbumFolksFetcher | AlbumFolks/Classes/external/UIScrollView+InfiniteScroll.h | //Library to easy enable infinite scroll. Easier integration than through CocoaPods
//Taken from https://github.com/pronebird/UIScrollView-InfiniteScroll
// UIScrollView+InfiniteScroll.h
//
// UIScrollView infinite scroll category
//
// Created by <NAME> on 9/4/13.
// Copyright (c) 2013-2015 <NAME>. All rights res... |
carlosmouracorreia/AlbumFolksFetcher | AlbumFolks/Classes/external/AlbumFolks-Bridging-Header.h |
//Library to easy enable infinite scroll. Easier integration than through CocoaPods
//Taken from https://github.com/pronebird/UIScrollView-InfiniteScroll
#import "UIScrollView+InfiniteScroll.h"
|
jcspencer/lobsters-ios | vendor/InfiniteScroll/UIScrollView+InfiniteScroll.h | //
// UIScrollView+InfiniteScroll.h
//
// UIScrollView infinite scroll category
//
// Created by <NAME> on 9/4/13.
// Copyright (c) 2013 <NAME>. All rights reserved.
//
#import <UIKit/UIKit.h>
typedef void(^pb_infinite_scroll_handler_t)(void);
typedef void(^pb_infinite_scroll_completion_t)(void);
@interface UISc... |
jcspencer/lobsters-ios | vendor/InfiniteScroll/UIBarButtonItem+ETBlockActions.h | <reponame>jcspencer/lobsters-ios
#import <UIKit/UIKit.h>
@interface UIBarButtonItem (ETBlockActions)
- (id) initWithTitle:(NSString *)title style:(UIBarButtonItemStyle)style eventHandler:(void(^)(void))handler;
@end
|
pedrocardoso5/Grall | include/graal.h | <reponame>pedrocardoso5/Grall<filename>include/graal.h
#ifndef GRAAL_H
#define GRAAL_H
#include<iostream>
#include<vector>
#include<cstring>
#include <iterator>
#include <functional>
#include <algorithm>
//Faltou serem feitas as funções uniq() e qsort()
using Compare = bool(*)(const vo... |
tarachandverma/ngx-openidc | src/common-utils/common_utils.c | /*
* Created by <NAME> on 01/04/14.
*
*/
#include <common_utils.h>
#include <sys/stat.h>
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <ifaddrs.h>
#include <stdlib.h>
#include <sys/time.h>
#include <t... |
tarachandverma/ngx-openidc | src/shm_core/shm_apr.h | <reponame>tarachandverma/ngx-openidc<gh_stars>10-100
#ifndef __TCREWRITE_SHM_APR__H_
#define __TCREWRITE_SHM_APR__H_
#include <sys/types.h>
#include <shm_data.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
* Abstract type for hash tables.
*/
typedef struct shapr_hash_t shapr_hash_t;
/**
* Abstract type for s... |
tarachandverma/ngx-openidc | src/oidc-core/oidc_core_constants.h | #ifndef ACTION_MAPPINGS_CONSTANTS_H_
#define ACTION_MAPPINGS_CONSTANTS_H_
typedef enum {
header_add = 'a', /* add header (could mean multiple hdrs) */
header_set = 's', /* set (replace old value) */
header_append = 'm', /* append (merge into any old value) */
header_... |
tarachandverma/ngx-openidc | src/template-core/template_handler_url.h | <reponame>tarachandverma/ngx-openidc<filename>src/template-core/template_handler_url.h
#ifndef TOKEN_TEMPLATE_URL_H_
#define TOKEN_TEMPLATE_URL_H_
#include "apache_typedefs.h"
char* temphand_url_encodeToken(pool* p,void* config,char* src);
char* temphand_url_decodeToken(pool* p,void* config,char* src);
// base64 e... |
tarachandverma/ngx-openidc | src/common-utils/cookie.c | #ifndef _COOKIE_C_
#define _COOKIE_C_
#include "cookie.h"
#include "url_utils.h"
//Creater methods
Cookie* cookie_newObj(pool*p){
Cookie* ret=(Cookie*)apr_pcalloc(p,sizeof(Cookie));
ret->name=NULL;
ret->nameLen=0;
ret->age=-1;
ret->httpOnly=FALSE;
ret->secure=FALSE;
return ret;
}
Cookie* cookie_createCookieBy... |
tarachandverma/ngx-openidc | src/xml-core/xml_core.h | <reponame>tarachandverma/ngx-openidc
/*
* Created by <NAME> on 01/04/14.
*
*/
#ifndef __TCREWRITE_XML_CORE__H_
#define __TCREWRITE_XML_CORE__H_
#ifdef __cplusplus
extern "C" {
#endif
#include "apache_typedefs.h"
typedef struct llnode {
void* data;
struct llnode *next;
struct llnode *prev;
}llnode;... |
tarachandverma/ngx-openidc | src/config-core/config_messaging_parsing.c | #include <unistd.h>
#include <sys/time.h>
#include <string.h>
#include <stdlib.h>
#include <limits.h>
#include "xml_core.h"
#include "config_messaging_parsing.h"
#include "common_utils.h"
#include "oidc_version.h"
typedef struct cfgm_parse_bundle{
char* tmp;
cfgm_wire_message* msg;
}cfgm_parse_bundle;
/*... |
tarachandverma/ngx-openidc | src/shm_core/shm_dup.h | #ifndef __TCREWRITE_SHM_DUP__H_
#define __TCREWRITE_SHM_DUP__H_
#include <sys/types.h>
#include "apache_typedefs.h"
#ifdef __cplusplus
extern "C" {
#endif
int shdup_32BitString_size(char* str);
char* shdup_32BitString_copy(char** icharbuf, char* str);
int shdup_arrayheader_size(array_header* arr);
#ifdef __cplusp... |
tarachandverma/ngx-openidc | src/config-core/config_messaging_parsing.h | <filename>src/config-core/config_messaging_parsing.h
#ifndef __TCREWRITE_CONFIG_MESSAGING_PARSING__H_
#define __TCREWRITE_CONFIG_MESSAGING_PARSING__H_
#include <sys/types.h>
#include "apache_typedefs.h"
typedef struct cfgm_wire_header{
char* nodeName;
char* componentId;
char* version;
}cfgm_wire_header;
typ... |
tarachandverma/ngx-openidc | src/config-core/config_bindings_shm.c | #include <shm_data.h>
#include <shm_apr.h>
#include <common_utils.h>
#include <http-utils/http_client.h>
#include <config-core/config_bindings.h>
#include <config-core/config_bindings_shm.h>
#define SHEAP_ITEM_ID_CONFIG_CORE_GLOBALS "CONFIG_CORE_GLOBALS"
shapr_hash_t* cbs_copyParamsOnSheap(pool*p, shared_heap*sheap,... |
tarachandverma/ngx-openidc | src/oidc-globals/oidc_globals.c | <reponame>tarachandverma/ngx-openidc<filename>src/oidc-globals/oidc_globals.c
/*
* Created by <NAME> on 04/27/15.
*
*/
#include <oidc_globals.h>
#include <common_utils.h>
static int DJRE_EnableUnnamedSHM = FALSE;
static int DJRE_ConfigCheckPhaseDelaySec = 0;
void djrglobals_setEnableUnnamedSHM(const char * arg) {... |
tarachandverma/ngx-openidc | src/xml-core/xml_core.c | <reponame>tarachandverma/ngx-openidc
/*
* Created by <NAME> on 01/04/14.
*
*/
#include <xml_core.h>
#include <expat.h>
#include <stdio.h>
#include <string.h>
#include <token_utils.h>
#include "apr_strings.h"
#define BUFFSIZE 8192
#ifdef XML_LARGE_SIZE
#if defined(XML_USE_MSC_EXTENSIONS) && _MSC_VER < 1400
#define ... |
tarachandverma/ngx-openidc | src/url-utils/url_utils.h | #ifndef __TCREWRITE_URL_UTILS__H_
#define __TCREWRITE_URL_UTILS__H_
#include <apr_general.h>
#include <apr_pools.h>
#include <apr_tables.h>
#include <apr_strings.h>
#include <apr_lib.h>
#include "apache_typedefs.h"
#ifdef __cplusplus
extern "C" {
#endif
int url_get_param(const char *queryString, const char *paramName,... |
tarachandverma/ngx-openidc | src/ngx_http_openidc_module.c | #include <ngx_config.h>
#include <ngx_core.h>
#include <ngx_http.h>
#include <nginx.h>
#include <apr_pools.h>
#include <apr_tables.h>
#include <apr_strings.h>
#include "oidc_config.h"
#include "config_core.h"
#include "common_utils.h"
#include "http-utils/http_client.h"
#include "logging.h"
#include "url_utils.h"
#incl... |
tarachandverma/ngx-openidc | src/shm_core/shm_data.c | #include <shm_data.h>
#include <signal.h>
#include <time.h>
#include <string.h>
#include <stdio.h>
#include <shm_dup.h>
#include "apache_macros.h"
#include <common_utils.h>
#include <log-utils/logging.h>
#include <oidc_globals.h>
static smutex_refresh_mutex* shdata_getMutex(pool *p){
smutex_refresh_mutex* mutex;
... |
tarachandverma/ngx-openidc | src/config-core/config_bindings.h | #ifndef __TCREWRITE_CONFIG_BINDINGS__H_
#define __TCREWRITE_CONFIG_BINDINGS__H_
#include <sys/types.h>
#include "apache_typedefs.h"
typedef struct cfg_service_descriptor{
char* id;
char* name;
char* uri;
char* userColonPass;
long timeoutSeconds;
apr_hash_t * params;
}cfg_service_descriptor;
// old ver... |
tarachandverma/ngx-openidc | src/shm_core/shm_data.h | #ifndef __TCREWRITE_SHM_DATA__H_
#define __TCREWRITE_SHM_DATA__H_
#include <sys/types.h>
#include "apache_typedefs.h"
#include <apr_shm.h>
#ifdef __cplusplus
extern "C" {
#endif
#define MAX_PAGE_ITEMS 16
#define PAGE_ITEM_CHARS 128
#define SEGMENTS_PER_PAGE 2
//#define TOKEN_KEY_OFFSET 12
//#define SHM_BOOT_S... |
tarachandverma/ngx-openidc | src/oidc-globals/oidc_version.h | <filename>src/oidc-globals/oidc_version.h
/*
* Created by <NAME> on 01/07/14.
*
*/
#ifndef __TCREWRITE_VERSION__H_
#define __TCREWRITE_VERSION__H_
#include <sys/types.h>
#define MODULE_COMPONENT_ID "ngx_openidc"
#define MODULE_VERSION_ID "0.0.5"
#define VERSION_ID MODULE_COMPONENT_ID" "MODULE_VERSION_ID
#endi... |
tarachandverma/ngx-openidc | src/oidc-core/oidc_config_xml.h | #ifndef __TCREWRITE_ACTION_MAPPINGS_XML__H_
#define __TCREWRITE_ACTION_MAPPINGS_XML__H_
#include "apache_typedefs.h"
#include "oidc_core_constants.h"
#include "cookie.h"
typedef struct action_header_xml{
char* name;
char* value;
char* regex;
header_actions action;
}action_header_xml;
// custom response
t... |
tarachandverma/ngx-openidc | src/config-core/config_bindings_shm.h | <filename>src/config-core/config_bindings_shm.h<gh_stars>10-100
#ifndef CONFIG_BINDINGS_SHM_H_
#define CONFIG_BINDINGS_SHM_H_
#include <shm_data.h>
#include <shm_apr.h>
#include <config-core/config_bindings.h>
typedef struct cbs_service_descriptor{
char* id;
char* name;
char* uri;
char* userColonPass;
long ... |
tarachandverma/ngx-openidc | src/config-core/config_core.c | <filename>src/config-core/config_core.c<gh_stars>10-100
#include <unistd.h>
#include <sys/time.h>
#include <string.h>
#include <stdlib.h>
#include "config_core.h"
#include "xml_core.h"
#include "common_utils.h"
#include "oidc_globals.h"
#include "config_bindings_shm.h"
#include "oidc_version.h"
#include "logging.h"
c... |
tarachandverma/ngx-openidc | src/log-utils/logging.h | <filename>src/log-utils/logging.h
#ifndef __TCREWRITE_LOGGING__H_
#define __TCREWRITE_LOGGING__H_
#include <apr_file_io.h>
#include "apache_typedefs.h"
typedef struct mm_logger{
pool* p;
char* filepath;
apr_file_t* file;
long maxLogFileSizeMB;
}mm_logger;
mm_logger* logging_getLogger(pool* p,char* path,lo... |
tarachandverma/ngx-openidc | src/oidc-globals/oidc_globals.h | #ifndef __TCREWRITE_GLOBALS__H_
#define __TCREWRITE_GLOBALS__H_
//Exposed functions for the Enable unnamed shared memory flag.
void djrglobals_setEnableUnnamedSHM(const char * arg);
int djrglobals_isUnnamedSHMEnabled();
//Exposed functions to set/get config check phase delay seconds.
void djrglobals_setConfigChe... |
tarachandverma/ngx-openidc | src/oidc-core/match_list.c | <filename>src/oidc-core/match_list.c
#include <xml_core.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <oidc-core/match_list.h>
#include <oidc-core/rewrite_core.h>
#include <common-utils/common_utils.h>
mlx_match_event* ml_newMatchEventObj(pool*p){
mlx_match_event*ret=(ml... |
tarachandverma/ngx-openidc | src/oidc-core/oidc_config_core.h | #ifndef __TCREWRITE_ACTION_MAPPINGS_CORE__H_
#define __TCREWRITE_ACTION_MAPPINGS_CORE__H_
#include "apache_typedefs.h"
#include "config_bindings_shm.h"
char* amc_initialize(pool* p,shared_heap* sheap,cbs_globals* globals,cfg_service_descriptor* svcdesc,void** userdata);
char* amc_refresh(pool* p,shared_heap* sheap,cb... |
tarachandverma/ngx-openidc | src/config-core/config_messaging.h | <gh_stars>10-100
#ifndef __TCREWRITE_CONFIG_MESSAGING__H_
#define __TCREWRITE_CONFIG_MESSAGING__H_
#include <sys/types.h>
#include "apache_typedefs.h"
#include <config-core/config_messaging_parsing.h>
#include "apr_thread_proc.h"
typedef struct cfgm_connection{
cfgm_wire_header* wireHeader;
}cfgm_connection;
... |
tarachandverma/ngx-openidc | src/oidc-core/match_list.h | #ifndef MATCH_LIST_H_
#define MATCH_LIST_H_
typedef struct mlx_match_event{
time_t start;
time_t end;
}mlx_match_event;
typedef struct mlx_match_header{
char* name;
char* value;
char* delimAnd;
int negate;
int isRegex;
}mlx_match_header;
typedef struct mlx_match_ip{
char* ip;
int negate;
int... |
tarachandverma/ngx-openidc | src/doc-parser-core/doc_parser_utils.h | <reponame>tarachandverma/ngx-openidc
#ifndef DOC_PARSER_UTILS_H_
#define DOC_PARSER_UTILS_H_
#include <config-core/config_bindings_shm.h>
char* docp_getRemoteResourcePath(pool* p, char* resource,cbs_service_descriptor *rs,char* homeDir,char**details);
char* docp_getLocalResourcePath(pool*p,char* resource,char* homeDi... |
tarachandverma/ngx-openidc | src/service-utils/http-utils/http_client.c | #include <http-utils/http_client.h>
//curl stuff
#include <curl/curl.h>
//#include <curl/types.h>
#include <curl/easy.h>
void hc_init(){
curl_global_init(CURL_GLOBAL_ALL);
}
char* hc_getInfo(apr_pool_t* p){
return curl_version();
}
void hc_cleanup(){
curl_global_cleanup();
}
int hc_is200_OK(http_util_result* ret... |
tarachandverma/ngx-openidc | src/config-core/config_bindings.c | #include <unistd.h>
#include <sys/time.h>
#include <string.h>
#include <stdlib.h>
#include <config-core/config_bindings.h>
#include <common_utils.h>
#include <http-utils/http_client.h>
#include "rewrite_core.h"
#ifndef __USE_GNU
#define __USE_GNU
#endif
#include <dlfcn.h>
#define URI_POSTFIX_AUTOREFRESH_TIMESTAMP "a... |
tarachandverma/ngx-openidc | src/json-api-core/unit-test/json_api_core_unit_test.c | <gh_stars>10-100
#include <stdlib.h>
#include <apr_general.h>
#include <apr_pools.h>
#include <stdio.h>
#include <assert.h>
#include "CuTest.h"
#include "json_parser.h"
#include "json_api.h"
#include "common_utils.h"
// Used by some code below as an example datatype.
struct record {const char *precision;double lat,lon... |
tarachandverma/ngx-openidc | src/xml-core/token_utils.h | /*
* Created by <NAME> on 01/04/14.
*
*/
#ifndef __TCREWRITE_TOKEN_UTILS__H_
#define __TCREWRITE_TOKEN_UTILS__H_
#include "apache_typedefs.h"
typedef struct {
char* text;
char* delim;
int delim_len;
size_t offset;
pool* p;
} Tokener;
Tokener* tu_getTokenizer (pool* p, char* text, char* delim);
char *tu_nex... |
tarachandverma/ngx-openidc | src/apache-utils/apache_macros.h | /*
* Created by <NAME> on 01/04/14.
*
*/
#ifndef __TCREWRITE_APACHE_MACROS__H_
#define __TCREWRITE_APACHE_MACROS__H_
#define SAFESTR(str) (str!=NULL?str:"NULL")
#define SAFESTRBLANK(str) (str!=NULL?str:"")
#define SAFESTRELSE(str,elstr) (str!=NULL?str:elstr)
#define SAFESTRLEN(str) (str!=NULL?strlen(str):0)
#def... |
tarachandverma/ngx-openidc | src/url-utils/url_utils.c | #include <stdio.h>
#include <ctype.h>
#include <string.h>
#include "url_utils.h"
#define MAX_VAR_SIZE 256
#define URL_MAX_VAR_SIZE 1280
const int STAGE=0;
const int STEP=1;
const int CURSOR=2;
int c_to_hex(char c) {
return 0xF & (('0' <= c && c <= '9')? (c - '0') : (toupper(c) - 'A' + 10));
}
int containsValidSl... |
tarachandverma/ngx-openidc | src/oidc-core/oidc_config.h | <reponame>tarachandverma/ngx-openidc
#ifndef __TCREWRITE_ACTION_MAPPINGS__H_
#define __TCREWRITE_ACTION_MAPPINGS__H_
#include <apr_general.h>
#include <apr_pools.h>
#include <apr_tables.h>
#include <apache_typedefs.h>
#include <shm_data.h>
#include <shm_apr.h>
#include <template-core/template_engine.h>
#include <config... |
tarachandverma/ngx-openidc | src/apache-utils/apache_typedefs.h | <reponame>tarachandverma/ngx-openidc
/*
* Created by <NAME> on 01/04/14.
*
*/
#ifndef __TCREWRITE_APACHE_TYPEDEFS__H_
#define __TCREWRITE_APACHE_TYPEDEFS__H_
#include <apr_network_io.h>
#include <apr_strings.h>
#include <apr_tables.h>
#include <apr_hash.h>
#include <apache_macros.h>
#include <apr_general.h>
#incl... |
tarachandverma/ngx-openidc | src/log-utils/logging.c | <reponame>tarachandverma/ngx-openidc
#include <unistd.h>
#include <apr_time.h>
#include <sys/stat.h>
#include "logging.h"
#include "common_utils.h"
#define BUFFERSIZE 2048
mm_logger* logging_getLogger(pool* p,char* path,long maxLogFileSizeMB){
apr_status_t rc;
if(path==NULL) return NULL;
mm_logger* ret=(mm... |
tarachandverma/ngx-openidc | src/common-utils/cookie.h | #ifndef _COOKIE_H_
#define _COOKIE_H_
#ifdef __cplusplus
extern "C" {
#endif
#include <sys/types.h>
#include <shm_data.h>
#include <shm_apr.h>
typedef struct Cookie {
char* name; // Cookie
int nameLen; // Cookie name length
int age; // in Days
unsigned int httpOnly; // httpOnly support.
i... |
tarachandverma/ngx-openidc | src/shm_core/shm_dup.c |
#include <string.h>
#include <shm_dup.h>
#include <math.h>
int shdup_32BitString_size(char* str){
int tmp, mod;
if(str==NULL) return 0;
tmp=strlen(str)+1;
mod=tmp%4;
if(mod>0){
tmp=tmp-mod+4;
}
return tmp;
}
int shdup_arrayheader_size(array_header* arr){
int sz=0;
sz+=sizeof(array_header);... |
tarachandverma/ngx-openidc | src/config-core/config_messaging.c | #include <unistd.h>
#include <sys/time.h>
#include <string.h>
#include <stdlib.h>
#include <common_utils.h>
#include <config-core/config_messaging.h>
#include <config-core/config_core.h>
#include <config-core/config_messaging_parsing.h>
#include <log-utils/logging.h>
#include <http-utils/http_client.h>
#include "xml_co... |
tarachandverma/ngx-openidc | src/json-api-core/json_parser.h | #ifndef JSON_PARSER_H
#define JSON_PARSER_H
#include "apache_typedefs.h"
#ifdef __cplusplus
extern "C"
{
#endif
enum {
JSON_False=0,
JSON_True=1,
JSON_NULL=2,
JSON_Number=3,
JSON_String=4,
JSON_Array=5,
JSON_Object=6
};
#define JSON_IsReference 256
//Forward declaration.
typedef struct Value Value;
// Supp... |
tarachandverma/ngx-openidc | src/template-core/template_engine.h | #ifndef TEMPLATE_ENGINE_H_
#define TEMPLATE_ENGINE_H_
#include <apache_typedefs.h>
#include <shm_apr.h>
#include <shm_data.h>
#include "config_bindings.h"
#include "template_handler_url.h"
#include "config_bindings_shm.h"
typedef char* (*tengine_template_init)(pool*,shared_heap*,cbs_globals*,void**);
typedef char* (*t... |
tarachandverma/ngx-openidc | src/unit-test/runalltest.c | <reponame>tarachandverma/ngx-openidc
#include <stdlib.h>
#include <apr_general.h>
#include <apr_pools.h>
#include <stdio.h>
#include <assert.h>
#include <CuTest.h>
#include <logging.h>
// Declare xxx_GetSuite() from xxx module here
// i.e. CuSuite* prodDefinitions_GetSuite();
static int die(int exitCode, const char *m... |
tarachandverma/ngx-openidc | src/oidc-core/oidc_config.c | #include <oidc-core/oidc_config.h>
#include <oidc-core/oidc_config_xml.h>
#include <oidc-core/rewrite_core.h>
#include <common_utils.h>
#include <oidc-core/match_list.h>
#include <doc_parser_utils.h>
#include <http-utils/http_client.h>
#define CONST_PATH_ACTION_DEF_ELTS 4
#define SHEAP_ITEM_ID_AUTHZ_OIDC "NGX_OPENIDC"... |
tarachandverma/ngx-openidc | src/oidc-core/rewrite_core.c | <reponame>tarachandverma/ngx-openidc<filename>src/oidc-core/rewrite_core.c
#include <oidc-core/rewrite_core.h>
#include "common_utils.h"
#include "url_utils.h"
#ifdef NGX_TCREWRITE_PCRE
#include <pcre.h>
#include <pcreposix.h>
static void * oidc_pcre_malloc(size_t size);
static void oidc_pcre_free(void *ptr);
... |
tarachandverma/ngx-openidc | src/common-utils/common_utils.h | /*
* Created by <NAME> on 01/04/14.
*
*/
#ifndef __TCREWRITE_COMMON_UTILS__H_
#define __TCREWRITE_COMMON_UTILS__H_
#ifdef __cplusplus
extern "C" {
#endif
#include <apr_general.h>
#include <apr_pools.h>
#include <apr_tables.h>
#include <apr_hash.h>
#include <apr_strings.h>
#include <sys/types.h>
#include <time.h>
#... |
tarachandverma/ngx-openidc | src/oidc-core/rewrite_core.h | #ifndef __TCREWRITE_REWRITE_CORE__H_
#define __TCREWRITE_REWRITE_CORE__H_
#include <apr_general.h>
#include <apr_pools.h>
#include <apr_tables.h>
#include <apr_strings.h>
#include <apr_lib.h>
#include <apache_typedefs.h>
#define REWRITE_CORE_VERSION "1.0"
char* rc_getInfo(pool* p);
int rc_matchByStrings(pool* p, c... |
tarachandverma/ngx-openidc | src/apache-utils/apache_mappings.h | /*
* Created by <NAME> on 01/04/14.
*
*/
#ifndef __TCREWRITE_APACHE_MAPPINGS__H_
#define __TCREWRITE_APACHE_MAPPINGS__H_
#ifdef NGX_HTTP_OPENIDC
#include <ngx_config.h>
#include <ngx_core.h>
#include <ngx_http.h>
#include <nginx.h>
#else
#include "httpd.h"
#include "http_config.h"
#include "http_log.h"
#in... |
tarachandverma/ngx-openidc | src/config-core/config_core.h | #ifndef __TCREWRITE_CONFIG_CORE__H_
#define __TCREWRITE_CONFIG_CORE__H_
#include <sys/types.h>
#include "apache_typedefs.h"
#include "shm_apr.h"
#include "config_bindings.h"
#include "oidc_config_core.h"
#include "config_messaging.h"
#include "config_bindings_shm.h"
#include "common_utils.h"
typedef struct config_co... |
tarachandverma/ngx-openidc | src/oidc-core/oidc_config_core.c | <filename>src/oidc-core/oidc_config_core.c
#include "oidc_config.h"
#include "oidc_config_core.h"
#define PARAM_CONFIG_XML "config-xml"
#define PARAM_IS_REFRESH "initialized"
char* amc_initialize(pool* p,shared_heap* sheap,cbs_globals* globals,cfg_service_descriptor* svcdesc,void** userdata){
char* result=NULL;
ch... |
tarachandverma/ngx-openidc | src/oidc-core/unit-test/oidc_core_unit_test.c | #include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <apr_general.h>
#include <apr_pools.h>
#include <rewrite_core.h>
#include <CuTest.h>
#include <common_utils.h>
#include <oidc_config_xml.h>
#include <shm_data.h>
#include <match_list.h>
#include "config-core/config_bindings_shm.h"
#include "doc_parser_... |
tarachandverma/ngx-openidc | src/oidc-core/oidc_config_xml.c | #include <xml_core.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <common_utils.h>
#include <oidc-core/oidc_config_xml.h>
#include <oidc-core/rewrite_core.h>
#include <oidc-core/match_list.h>
#define CONST_INIT_PAGE_ACTIONS_ELTS 4
#define CONST_INIT_MATCH_LIST_ELTS 4
#def... |
tarachandverma/ngx-openidc | src/service-utils/http-utils/http_client.h | <filename>src/service-utils/http-utils/http_client.h
#ifndef HTTP_CLIENT_H_
#define HTTP_CLIENT_H_
#ifdef __cplusplus
extern "C" {
#endif
//apr stuff
#include <apr_general.h>
#include <apr_pools.h>
#include <apr_strings.h>
#include <apr_tables.h>
#define HTTP_USER_AGENT "openidc-libcurl"
typedef struct http_util_res... |
tarachandverma/ngx-openidc | src/doc-parser-core/doc_parser_utils.c | #include <doc_parser_utils.h>
#include "apr_lib.h"
#include "apr_strings.h"
char* docp_getRemoteResourcePath(pool* p, char* resource,
cbs_service_descriptor *rs,char* homeDir,char**details){
char* ret=NULL,*reqUri;
apr_pool_t* tp;
char* fileName=NULL;
if(resource==NULL) return NULL;
if(rs!=NULL){
/... |
tarachandverma/ngx-openidc | src/shm_core/shm_apr.c | <reponame>tarachandverma/ngx-openidc
#include "shm_apr.h"
#include "shm_data.h"
#include "common_utils.h"
static void shapr_make_array_core(array_header *res, shared_heap* sheap,int nelts, int elt_size, int clear){
/*
* Assure sanity if someone asks for
* array of zero elts.
*/
if (nel... |
tarachandverma/ngx-openidc | src/template-core/template_engine.c | #include "template_engine.h"
#include "common_utils.h"
#include <apr_lib.h>
static int templatecore_templateCount(){
return sizeof(template_eng_templates)/sizeof(template_eng_template);
}
static template_eng_template* templatecore_findTemplate(char* id){
int x;
int len=templatecore_templateCount();
for(x=0... |
tarachandverma/ngx-openidc | src/template-core/template_handler_url.c | <gh_stars>10-100
#include "template_handler_url.h"
#include "url_utils.h"
char* temphand_url_encodeToken(pool* p,void* config,char* src){
return url_encode2(p,src);
}
char* temphand_url_decodeToken(pool* p,void* config,char* src){
return url_decode2(p,src);
}
// base64 encode decode
char* temphand_base64_e... |
gramado/miniyacc | y.tab.c | short yyini = 0;
short yyntoks = 83;
short yyr1[] = {
2, 1, 2, 1, 1, 1, 3, 1, 3, 1,
4, 3, 4, 3, 3, 2, 2, 1, 3, 1,
3, 1, 2, 2, 2, 2, 4, 1, 1, 1,
1, 1, 1, 1, 4, 1, 2, 1, 3, 3,
3, 1, 3, 3, 1, 3, 3, 1, 3, 3,
3, 3, ... |
DieracDelta/cbat_tools | wp/resources/sample_binaries/nested_ifs/main.c | <gh_stars>0
#include <assert.h>
#include <stdlib.h>
#define STRING_MAX 10
void gotoExample()
{
char *string1, *string2, *string3, *string4, *string5;
if ( !(string1 = (char*) calloc(STRING_MAX, sizeof(char))) )
goto gotoExample_string1;
if ( !(string2 = (char*) calloc(STRING_MAX, sizeof(char))) )... |
DieracDelta/cbat_tools | wp/resources/sample_binaries/equiv_null_check/main_2.c | <reponame>DieracDelta/cbat_tools<gh_stars>0
#include<stdlib.h>
#include<assert.h>
int main(void) {
char * p = malloc(10);
if( p == NULL ) assert(0);
* (p + 3) = 0;
return * (p + 3);
}
|
onea7351/hackingtober | largest_of_three.c | <filename>largest_of_three.c
# Python program to find the largest number among the three input numbers
# take three numbers from user
num1 = float(input("Enter first number: "))
num2 = float(input("Enter second number: "))
num3 = float(input("Enter third number: "))
if (num1 > num2) and (num1 > num3):
largest = nu... |
Made4Dev/SFBL | sfbl.h | <reponame>Made4Dev/SFBL
#ifndef SFBL_H
#define SFBL_H
#include <Box2D\Box2D.h>
#include <iostream>
#include <SFML\Graphics.hpp>
#include <SFML\OpenGL.hpp>
#include <functional>
#define MIN_RAYS 3
#define MAX_RAYS 0xFFFF // 65535
class RaysCastCallback : public b2RayCastCallback
{
public:
RaysCastCallback(b2Vec2 s... |
maruinen/FullereneViewer | src/Carbon.h | <gh_stars>0
/*
* Project: FullereneViewer
* Version: 1.0
* Copyright: (C) 2011-14 Dr.Sc.KAWAMOTO,Takuji (Ext)
*/
#ifndef __CARBON_H__
#define __CARBON_H__
#include <stdio.h>
#include "ErrorCode.h"
#include "InteractiveRegularPolygon.h"
#include "Queue.h"
#include "List.h"
class Bond;
class Ring;
class Path;
clas... |
maruinen/FullereneViewer | src/StringPair.h | <reponame>maruinen/FullereneViewer<filename>src/StringPair.h<gh_stars>0
/*
* Project: FullereneViewer
* Version: 1.0
* Copyright: (C) 2011-14 Dr.Sc.KAWAMOTO,Takuji (Ext)
*/
#ifndef __STRINGPAIR_H__
#define __STRINGPAIR_H__
#include "Object.h"
#include "MyString.h"
class StringPair : public Object {
// friend c... |
maruinen/FullereneViewer | src/RepresentationInfo.h | /*
* Project: FullereneViewer
* Version: 1.0
* Copyright: (C) 2011-14 Dr.Sc.KAWAMOTO,Takuji (Ext)
*/
#ifndef __REPRESENTATIONINFO_H__
#define __REPRESENTATIONINFO_H__
#include "Object.h"
struct RepresentationInfo : public Object {
// members
public:
int clockwise;
int carbon_sequence_no;
int bond_sequenc... |
maruinen/FullereneViewer | src/ReflectionPair.h | /*
* Project: FullereneViewer
* Version: 1.0
* Copyright: (C) 2011-14 Dr.Sc.KAWAMOTO,Takuji (Ext)
*/
#ifndef __REFLECTIONPAIR_H__
#define __REFLECTIONPAIR_H__
#include "Object.h"
#include "MyString.h"
class Fullerene;
class ReflectionPair : public Object {
// friend classes & functions
// members
private:
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.