91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 9KB
    文件類型: .gz
    金幣: 1
    下載: 0 次
    發(fā)布日期: 2021-05-14
  • 語(yǔ)言: 其他
  • 標(biāo)簽: httpsqs??

資源簡(jiǎn)介

httpsqs-1.7.tar.gz,

資源截圖

代碼片段和文件信息

/*
HTTP?Simple?Queue?Service?-?httpsqs?v1.7
Author:?Zhang?Yan?(http://blog.s135.com)?E-mail:?net@s135.com
This?is?free?software?and?you?are?welcome?to?modify?and?redistribute?it?under?the?New?BSD?License
*/

#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?

#include?
#include?
#include?

#include?

#include?“prename.h“

#define?VERSION?“1.7“

/*?每個(gè)隊(duì)列的默認(rèn)最大長(zhǎng)度為100萬(wàn)條?*/
#define?HTTPSQS_DEFAULT_MAXQUEUE?1000000

/*?全局設(shè)置?*/
TCBDB?*httpsqs_db_tcbdb;?/*?數(shù)據(jù)表?*/
int?httpsqs_settings_syncinterval;?/*?同步更新內(nèi)容到磁盤的間隔時(shí)間?*/
char?*httpsqs_settings_pidfile;?/*?PID文件?*/
char?*httpsqs_settings_auth;?/*?驗(yàn)證密碼?*/

/*?創(chuàng)建多層目錄的函數(shù)?*/
void?create_multilayer_dir(?char?*muldir?)?
{
????int????ilen;
????char????str[512];
????
????strncpy(?str?muldir?512?);
????len=strlen(str);
????for(?i=0;?i????{
????????if(?str[i]==‘/‘?)
????????{
????????????str[i]?=?‘\0‘;
????????????//判斷此目錄是否存在不存在則創(chuàng)建
????????????if(?access(str?F_OK)!=0?)
????????????{
????????????????mkdir(?str?0777?);
????????????}
????????????str[i]=‘/‘;
????????}
????}
????if(?len>0?&&?access(str?F_OK)!=0?)
????{
????????mkdir(?str?0777?);
????}

????return;
}

char?*urldecode(char?*input_str)?
{
int?len?=?strlen(input_str);
char?*str?=?strdup(input_str);

????????char?*dest?=?str;?
????????char?*data?=?str;?

????????int?value;?
????????int?c;?

????????while?(len--)?{?
????????????????if?(*data?==?‘+‘)?{?
????????????????????????*dest?=?‘?‘;?
????????????????}?
????????????????else?if?(*data?==?‘%‘?&&?len?>=?2?&&?isxdigit((int)?*(data?+?1))?
??&&?isxdigit((int)?*(data?+?2)))?
????????????????{?

????????????????????????c?=?((unsigned?char?*)(data+1))[0];?
????????????????????????if?(isupper(c))?
????????????????????????????????c?=?tolower(c);?
????????????????????????value?=?(c?>=?‘0‘?&&?c?<=?‘9‘???c?-?‘0‘?:?c?-?‘a(chǎn)‘?+?10)?*?16;?
????????????????????????c?=?((unsigned?char?*)(data+1))[1];?
????????????????????????if?(isupper(c))?
????????????????????????????????c?=?tolower(c);?
????????????????????????????????value?+=?c?>=?‘0‘?&&?c?<=?‘9‘???c?-?‘0‘?:?c?-?‘a(chǎn)‘?+?10;?

????????????????????????*dest?=?(char)value?;?
????????????????????????data?+=?2;?
????????????????????????len?-=?2;?
????????????????}?else?{?
????????????????????????*dest?=?*data;?
????????????????}?
????????????????data++;?
????????????????dest++;?
????????}?
????????*dest?=?‘\0‘;?
????????return?str;?
}

/*?讀取隊(duì)列寫入點(diǎn)的值?*/
static?int?httpsqs_read_putpos(const?char*?httpsqs_input_name)
{
int?queue_value?=

評(píng)論

共有 條評(píng)論

相關(guān)資源