亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? debug.c

?? MC Linux/Unix 終端下文件管理器
?? C
字號:
/*   Unix SMB/Netbios implementation.   Version 1.9.   Samba utility functions   Copyright (C) Andrew Tridgell 1992-1998   This program is free software; you can redistribute it and/or modify   it under the terms of the GNU General Public License as published by   the Free Software Foundation; either version 2 of the License, or   (at your option) any later version.   This program is distributed in the hope that it will be useful,   but WITHOUT ANY WARRANTY; without even the implied warranty of   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the   GNU General Public License for more details.   You should have received a copy of the GNU General Public License   along with this program; if not, write to the Free Software   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.*/#include "includes.h"/* -------------------------------------------------------------------------- ** * Defines... * *  FORMAT_BUFR_MAX - Index of the last byte of the format buffer; *                    format_bufr[FORMAT_BUFR_MAX] should always be reserved *                    for a terminating nul byte. */#define FORMAT_BUFR_MAX ( sizeof( format_bufr ) - 1 )/* -------------------------------------------------------------------------- ** * This module implements Samba's debugging utility. * * The syntax of a debugging log file is represented as: * *  <debugfile> :== { <debugmsg> } * *  <debugmsg>  :== <debughdr> '\n' <debugtext> * *  <debughdr>  :== '[' TIME ',' LEVEL ']' [ [FILENAME ':'] [FUNCTION '()'] ] * *  <debugtext> :== { <debugline> } * *  <debugline> :== TEXT '\n' * * TEXT     is a string of characters excluding the newline character. * LEVEL    is the DEBUG level of the message (an integer in the range 0..10). * TIME     is a timestamp. * FILENAME is the name of the file from which the debug message was generated. * FUNCTION is the function from which the debug message was generated. * * Basically, what that all means is: * * - A debugging log file is made up of debug messages. * * - Each debug message is made up of a header and text.  The header is *   separated from the text by a newline. * * - The header begins with the timestamp and debug level of the message *   enclosed in brackets.  The filename and function from which the *   message was generated may follow.  The filename is terminated by a *   colon, and the function name is terminated by parenthesis. * * - The message text is made up of zero or more lines, each terminated by *   a newline. *//* -------------------------------------------------------------------------- ** * External variables. * *  dbf           - Global debug file handle. *  debugf        - Debug file name. *  append_log    - If True, then the output file will be opened in append *                  mode. *  DEBUGLEVEL    - System-wide debug message limit.  Messages with message- *                  levels higher than DEBUGLEVEL will not be processed. */FILE   *dbf        = NULL;pstring debugf     = "";BOOL    append_log = False;int     DEBUGLEVEL = 1;/* -------------------------------------------------------------------------- ** * Internal variables. * *  stdout_logging  - Default False, if set to True then dbf will be set to *                    stdout and debug output will go to dbf only, and not *                    to syslog.  Set in setup_logging() and read in Debug1(). * *  syslog_level    - Internal copy of the message debug level.  Written by *                    dbghdr() and read by Debug1(). * *  format_bufr     - Used to format debug messages.  The dbgtext() function *                    prints debug messages to a string, and then passes the *                    string to format_debug_text(), which uses format_bufr *                    to build the formatted output. * *  format_pos      - Marks the first free byte of the format_bufr. */static BOOL    stdout_logging = False;static pstring format_bufr    = { '\0' };static size_t  format_pos     = 0;/* -------------------------------------------------------------------------- ** * Functions... *//* ************************************************************************** ** * get ready for syslog stuff * ************************************************************************** ** */void setup_logging( char *pname, BOOL interactive )  {  if( interactive )    {    stdout_logging = True;    dbf = stderr;    }  } /* setup_logging *//* ************************************************************************** ** * Write an debug message on the debugfile. * This is called by dbghdr() and format_debug_text(). * ************************************************************************** ** */#ifdef HAVE_STDARG_H int Debug1( char *format_str, ... ){#else int Debug1(va_alist)va_dcl{    char *format_str;#endif  va_list ap;    int old_errno = errno;  if( stdout_logging )    {#ifdef HAVE_STDARG_H    va_start( ap, format_str );#else    va_start( ap );    format_str = va_arg( ap, char * );#endif    (void)vfprintf( dbf, format_str, ap );    va_end( ap );    errno = old_errno;    return( 0 );    }      if( !dbf )      {      mode_t oldumask = umask( 022 );      if( append_log )        dbf = sys_fopen( debugf, "a" );      else        dbf = sys_fopen( debugf, "w" );      (void)umask( oldumask );      if( dbf )        {        setbuf( dbf, NULL );        }      else        {        errno = old_errno;        return(0);        }      }    {#ifdef HAVE_STDARG_H    va_start( ap, format_str );#else    va_start( ap );    format_str = va_arg( ap, char * );#endif    (void)vfprintf( dbf, format_str, ap );    va_end( ap );    (void)fflush( dbf );    }  errno = old_errno;  return( 0 );  } /* Debug1 *//* ************************************************************************** ** * Print the buffer content via Debug1(), then reset the buffer. * *  Input:  none *  Output: none * * ************************************************************************** ** */static void bufr_print( void )  {  format_bufr[format_pos] = '\0';  (void)Debug1( "%s", format_bufr );  format_pos = 0;  } /* bufr_print *//* ************************************************************************** ** * Format the debug message text. * *  Input:  msg - Text to be added to the "current" debug message text. * *  Output: none. * *  Notes:  The purpose of this is two-fold.  First, each call to syslog() *          (used by Debug1(), see above) generates a new line of syslog *          output.  This is fixed by storing the partial lines until the *          newline character is encountered.  Second, printing the debug *          message lines when a newline is encountered allows us to add *          spaces, thus indenting the body of the message and making it *          more readable. * * ************************************************************************** ** */static void format_debug_text( char *msg )  {  size_t i;  BOOL timestamp = (!stdout_logging && (lp_timestamp_logs() || 					!(lp_loaded())));  for( i = 0; msg[i]; i++ )    {    /* Indent two spaces at each new line. */    if(timestamp && 0 == format_pos)      {      format_bufr[0] = format_bufr[1] = ' ';      format_pos = 2;      }    /* If there's room, copy the character to the format buffer. */    if( format_pos < FORMAT_BUFR_MAX )      format_bufr[format_pos++] = msg[i];    /* If a newline is encountered, print & restart. */    if( '\n' == msg[i] )      bufr_print();    /* If the buffer is full dump it out, reset it, and put out a line     * continuation indicator.     */    if( format_pos >= FORMAT_BUFR_MAX )      {      bufr_print();      (void)Debug1( " +>\n" );      }    }  /* Just to be safe... */  format_bufr[format_pos] = '\0';  } /* format_debug_text *//* ************************************************************************** ** * Flush debug output, including the format buffer content. * *  Input:  none *  Output: none * * ************************************************************************** ** */void dbgflush( void )  {  bufr_print();  (void)fflush( dbf );  } /* dbgflush *//* ************************************************************************** ** * Print a Debug Header. * *  Input:  level - Debug level of the message (not the system-wide debug *                  level. *          file  - Pointer to a string containing the name of the file *                  from which this function was called, or an empty string *                  if the __FILE__ macro is not implemented. *          func  - Pointer to a string containing the name of the function *                  from which this function was called, or an empty string *                  if the __FUNCTION__ macro is not implemented. *          line  - line number of the call to dbghdr, assuming __LINE__ *                  works. * *  Output: Always True.  This makes it easy to fudge a call to dbghdr() *          in a macro, since the function can be called as part of a test. *          Eg: ( (level <= DEBUGLEVEL) && (dbghdr(level,"",line)) ) * *  Notes:  This function takes care of setting syslog_level. * * ************************************************************************** ** */BOOL dbghdr( int level, char *file, char *func, int line )  {  if( format_pos )    {    /* This is a fudge.  If there is stuff sitting in the format_bufr, then     * the *right* thing to do is to call     *   format_debug_text( "\n" );     * to write the remainder, and then proceed with the new header.     * Unfortunately, there are several places in the code at which     * the DEBUG() macro is used to build partial lines.  That in mind,     * we'll work under the assumption that an incomplete line indicates     * that a new header is *not* desired.     */    return( True );    }  /* Don't print a header if we're logging to stdout. */  if( stdout_logging )    return( True );  /* Print the header if timestamps are turned on.  If parameters are   * not yet loaded, then default to timestamps on.   */  if( lp_timestamp_logs() || !(lp_loaded()) )    {    /* Print it all out at once to prevent split syslog output. */    (void)Debug1( "[%s, %d] %s:%s(%d)\n",                  timestring(), level, file, func, line );    }  return( True );  } /* dbghdr *//* ************************************************************************** ** * Add text to the body of the "current" debug message via the format buffer. * *  Input:  format_str  - Format string, as used in printf(), et. al. *          ...         - Variable argument list. * *  ..or..  va_alist    - Old style variable parameter list starting point. * *  Output: Always True.  See dbghdr() for more info, though this is not *          likely to be used in the same way. * * ************************************************************************** ** */#ifdef HAVE_STDARG_H BOOL dbgtext( char *format_str, ... )  {  va_list ap;  pstring msgbuf;  va_start( ap, format_str );   vslprintf( msgbuf, sizeof(msgbuf)-1, format_str, ap );  va_end( ap );  format_debug_text( msgbuf );  return( True );  } /* dbgtext */#else BOOL dbgtext( va_alist ) va_dcl  {  char *format_str;  va_list ap;  pstring msgbuf;  va_start( ap );  format_str = va_arg( ap, char * );  vslprintf( msgbuf, sizeof(msgbuf)-1, format_str, ap );  va_end( ap );  format_debug_text( msgbuf );  return( True );  } /* dbgtext */#endif/* ************************************************************************** */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美中文字幕一区二区三区| 久久精品国产精品亚洲精品| 秋霞av亚洲一区二区三| 色婷婷av一区二区三区大白胸| 欧美色精品天天在线观看视频| 欧美经典一区二区| 欧美怡红院视频| 另类小说视频一区二区| 国产午夜精品一区二区三区视频 | 91香蕉视频mp4| 午夜久久久影院| 欧美激情综合在线| 欧洲精品中文字幕| 激情偷乱视频一区二区三区| 国产精品成人一区二区艾草 | 日韩欧美亚洲一区二区| 国产精品白丝jk白祙喷水网站 | 捆绑调教一区二区三区| 中文字幕av一区二区三区高| 一本一道波多野结衣一区二区| 国产福利一区二区三区| 国产成人亚洲综合a∨婷婷 | 亚洲人成电影网站色mp4| 久久精品亚洲麻豆av一区二区| 欧美欧美午夜aⅴ在线观看| 色婷婷国产精品| 91在线码无精品| 91丨porny丨最新| 色偷偷88欧美精品久久久| 不卡av电影在线播放| 99视频热这里只有精品免费| 成人黄色免费短视频| 99久久99久久久精品齐齐| 99riav久久精品riav| 91精品国产乱码久久蜜臀| 日韩免费在线观看| 国产性天天综合网| 亚洲日本免费电影| 美女看a上一区| 国产成人高清在线| 91极品美女在线| 亚洲精品在线观看视频| 综合在线观看色| 青娱乐精品在线视频| 成人sese在线| 欧美电影精品一区二区| 国产精品传媒在线| 九九九久久久精品| 欧美午夜电影在线播放| 国产情人综合久久777777| 天天免费综合色| 97精品超碰一区二区三区| 欧美不卡一区二区三区四区| 亚洲激情欧美激情| 成人av动漫在线| 日本一区二区三区dvd视频在线| 亚洲国产精品一区二区www在线 | 91丨porny丨国产| 国产欧美日韩精品一区| 经典一区二区三区| 精品乱人伦小说| 久久精品国产澳门| 91精品在线一区二区| 亚洲综合色噜噜狠狠| 日本高清不卡一区| 亚洲国产综合人成综合网站| 99国产精品国产精品久久| 国产精品国产三级国产三级人妇| 国产精品1区二区.| 自拍av一区二区三区| av一区二区不卡| 亚洲一二三专区| 欧美最新大片在线看| 三级影片在线观看欧美日韩一区二区 | 亚洲免费观看高清完整版在线观看 | 欧美日韩你懂得| 蜜臀av一区二区三区| 日韩欧美在线综合网| 国产一区二区在线视频| 国产精品久久三| 欧美久久久久久久久| 久久99精品国产.久久久久久| 久久久欧美精品sm网站| 在线亚洲精品福利网址导航| 亚洲成人av中文| 久久伊人中文字幕| 欧美视频一区二区三区| 国产精品一二三四| 午夜欧美2019年伦理| 中文字幕亚洲电影| 久久夜色精品国产欧美乱极品| av一二三不卡影片| 麻豆91免费看| 婷婷夜色潮精品综合在线| 国产午夜精品一区二区三区视频| 欧美日韩中文另类| 国产电影精品久久禁18| 日韩av中文字幕一区二区三区 | 国产精品美女www爽爽爽| 91精品免费在线观看| 91激情在线视频| 色偷偷成人一区二区三区91| 91一区二区三区在线播放| 久久成人综合网| 一区二区三区久久| 亚洲色图欧洲色图| 中文字幕亚洲欧美在线不卡| 欧美精品一区二区蜜臀亚洲| 精品区一区二区| 国产欧美综合在线观看第十页| 久久久久久一级片| 国产无人区一区二区三区| 国产精品污www在线观看| 国产精品国产三级国产a| 亚洲欧美在线aaa| 亚洲高清三级视频| 国模大尺度一区二区三区| 成人午夜av电影| 欧美性色欧美a在线播放| 日韩一级精品视频在线观看| 久久免费午夜影院| 亚洲美女偷拍久久| 另类小说一区二区三区| 成人激情校园春色| 欧美午夜精品理论片a级按摩| 欧美一区二区在线不卡| 国产欧美精品一区| 婷婷综合另类小说色区| 国产一区二区久久| 欧美日韩精品综合在线| 国产精品毛片久久久久久久| 亚洲国产成人av网| 成人爽a毛片一区二区免费| 欧美三级电影网站| 国产精品久久久久久久久免费丝袜 | 不卡一区二区三区四区| 日韩网站在线看片你懂的| 欧美精品一区二区三区蜜桃视频 | 日本一不卡视频| 在线一区二区视频| 国产欧美日韩精品一区| 美女任你摸久久 | 欧美国产亚洲另类动漫| 久久av资源网| 日韩欧美色综合| 青青青爽久久午夜综合久久午夜| 成人av在线资源网站| 国产精品免费视频观看| 国产精品一区二区久久精品爱涩| 欧美日韩国产成人在线免费| 亚洲午夜激情av| 波多野结衣中文一区| 国产精品视频九色porn| 99riav久久精品riav| √…a在线天堂一区| 色综合久久综合网欧美综合网| 亚洲同性gay激情无套| 色综合久久综合网欧美综合网| 亚洲人成小说网站色在线| 在线观看国产91| 国产老妇另类xxxxx| 久久伊99综合婷婷久久伊| 风流少妇一区二区| 亚洲一区二区三区在线播放| 3d动漫精品啪啪一区二区竹菊| 蜜臀av性久久久久蜜臀av麻豆| 2023国产一二三区日本精品2022| 国产成人在线免费观看| 一区二区在线观看免费| 欧美成va人片在线观看| 色婷婷综合久久久久中文一区二区| 亚洲第一福利一区| 欧美韩日一区二区三区四区| 欧美日韩一区二区电影| 成人午夜激情视频| 美日韩一区二区三区| 亚洲免费三区一区二区| 久久久久久亚洲综合| 精品久久久久久久久久久久久久久 | 国产精品动漫网站| 337p亚洲精品色噜噜| 日本丶国产丶欧美色综合| 国产成人精品影视| 国产传媒日韩欧美成人| 久久99久久99精品免视看婷婷 | 亚洲丝袜制服诱惑| 国产欧美日韩精品a在线观看| 日韩久久久久久| 日韩免费高清电影| 日韩欧美国产麻豆| 欧美va天堂va视频va在线| 欧美一区二区三区啪啪| 欧美日韩视频在线一区二区| 色呦呦网站一区| 欧美影院精品一区| 欧美一区二区三区日韩视频| 日韩一级片网址| 亚洲国产精品激情在线观看| 国产精品久久久久一区| 亚洲高清视频中文字幕|