这篇教程C++ trim_filename函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中trim_filename函数的典型用法代码示例。如果您正苦于以下问题:C++ trim_filename函数的具体用法?C++ trim_filename怎么用?C++ trim_filename使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了trim_filename函数的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: rtl_check_failed_block_symbolvoidrtl_check_failed_block_symbol (const char *file, int line, const char *func){ internal_error ("RTL check: attempt to treat non-block symbol as a block symbol " "in %s, at %s:%d", func, trim_filename (file), line);}
开发者ID:keparo,项目名称:gcc,代码行数:7,
示例2: vec_assert_failvoidvec_assert_fail (const char *op, const char *struct_name, const char *file, unsigned int line, const char *function){ internal_error ("vector %s %s domain error, in %s at %s:%u", struct_name, op, function, trim_filename (file), line);}
开发者ID:AhmadTux,项目名称:DragonFlyBSD,代码行数:7,
示例3: varray_underflowvoidvarray_underflow (varray_type va, const char *file, int line, const char *function){ internal_error ("underflowed virtual array %s in %s, at %s:%d", va->name, function, trim_filename (file), line);}
开发者ID:0mp,项目名称:freebsd,代码行数:7,
示例4: rtl_check_failed_flagvoidrtl_check_failed_flag (const char *name, const_rtx r, const char *file, int line, const char *func){ internal_error ("RTL flag check: %s used with unexpected rtx code '%s' in %s, at %s:%d", name, GET_RTX_NAME (GET_CODE (r)), func, trim_filename (file), line);}
开发者ID:keparo,项目名称:gcc,代码行数:8,
示例5: rtvec_check_failed_bounds/* XXX Maybe print the vector? */voidrtvec_check_failed_bounds (const_rtvec r, int n, const char *file, int line, const char *func){ internal_error ("RTL check: access of elt %d of vector with last elt %d in %s, at %s:%d", n, GET_NUM_ELEM (r) - 1, func, trim_filename (file), line);}
开发者ID:keparo,项目名称:gcc,代码行数:9,
示例6: rtl_check_failed_code1voidrtl_check_failed_code1 (const_rtx r, enum rtx_code code, const char *file, int line, const char *func){ internal_error ("RTL check: expected code '%s', have '%s' in %s, at %s:%d", GET_RTX_NAME (code), GET_RTX_NAME (GET_CODE (r)), func, trim_filename (file), line);}
开发者ID:keparo,项目名称:gcc,代码行数:8,
示例7: rtl_check_failed_type2voidrtl_check_failed_type2 (const_rtx r, int n, int c1, int c2, const char *file, int line, const char *func){ internal_error ("RTL check: expected elt %d type '%c' or '%c', have '%c' (rtx %s) in %s, at %s:%d", n, c1, c2, GET_RTX_FORMAT (GET_CODE (r))[n], GET_RTX_NAME (GET_CODE (r)), func, trim_filename (file), line);}
开发者ID:keparo,项目名称:gcc,代码行数:9,
示例8: rtl_check_failed_boundsvoidrtl_check_failed_bounds (const_rtx r, int n, const char *file, int line, const char *func){ internal_error ("RTL check: access of elt %d of '%s' with last elt %d in %s, at %s:%d", n, GET_RTX_NAME (GET_CODE (r)), GET_RTX_LENGTH (GET_CODE (r)) - 1, func, trim_filename (file), line);}
开发者ID:keparo,项目名称:gcc,代码行数:9,
示例9: varray_check_failedvoidvarray_check_failed (varray_type va, size_t n, const char *file, int line, const char *function){ internal_error ("virtual array %s[%lu]: element %lu out of bounds " "in %s, at %s:%d", va->name, (unsigned long) va->num_elements, (unsigned long) n, function, trim_filename (file), line);}
开发者ID:0mp,项目名称:freebsd,代码行数:9,
示例10: rtl_check_failed_code_modevoidrtl_check_failed_code_mode (const_rtx r, enum rtx_code code, enum machine_mode mode, bool not_mode, const char *file, int line, const char *func){ internal_error ((not_mode ? ("RTL check: expected code '%s' and not mode '%s', " "have code '%s' and mode '%s' in %s, at %s:%d") : ("RTL check: expected code '%s' and mode '%s', " "have code '%s' and mode '%s' in %s, at %s:%d")), GET_RTX_NAME (code), GET_MODE_NAME (mode), GET_RTX_NAME (GET_CODE (r)), GET_MODE_NAME (GET_MODE (r)), func, trim_filename (file), line);}
开发者ID:keparo,项目名称:gcc,代码行数:14,
示例11: w32_error/* Print out the GetLastError() translation. */ static inline voidw32_error (const char* function, const char* file, int line, const char* my_msg){ LPSTR w32_msgbuf; FormatMessageA (FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS | FORMAT_MESSAGE_MAX_WIDTH_MASK, NULL, GetLastError(), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPSTR) &w32_msgbuf, 0, NULL); fprintf(stderr, "internal error in %s, at %s:%d: %s: %s/n", function, trim_filename (file), line, my_msg, w32_msgbuf); LocalFree ((HLOCAL)w32_msgbuf);}
开发者ID:AHelper,项目名称:gcc,代码行数:17,
示例12: fifo_process/* * Man FIFO routine running in the FIFO * processes requests received * through the FIFO file repeatedly */int fifo_process(char* msg_buf, int size, int* bytes_needed, void *sh, void** saved_state){ rpc_export_t* exp; char* buf; int line_len; char *file_sep; struct text_chunk* p; struct rpc_struct* s; int r; int req_size; static rpc_ctx_t context; DBG("process_fifo: called with %d bytes, offset %d: %.*s/n", size, (int)(long)*saved_state, size, msg_buf); /* search for the end of the request (/n/r) */ if (size < 6){ /* min fifo request */ *bytes_needed=6-size; return 0; /* we want more bytes, nothing processed */ } for (r=1+(int)(long)*saved_state;r<size;r++){ if ((msg_buf[r]=='/n' || msg_buf[r]=='/r') && (msg_buf[r-1]=='/n'|| msg_buf[r-1]=='/r')){ /* found double cr, or double lf => end of request */ req_size=r; goto process; } } /* no end of request found => ask for more bytes */ *bytes_needed=1; /* save current offset, to optimize search */ *saved_state=(void*)(long)(r-1); return 0; /* we want again the whole buffer */process: DBG("process_fifo %d bytes request: %.*s/n", req_size, req_size, msg_buf); file_sep = 0; context.method = 0; context.reply_file = 0; context.body = 0; context.code = 200; context.reason = "OK"; context.reply_sent = 0; context.last = 0; context.line_no = 0; context.read_h.s=msg_buf; context.read_h.end=msg_buf+size; context.read_h.crt=msg_buf; context.send_h=(struct send_handle*)sh; /* commands must look this way ':<command>:[filename]' */ if (read_line(&buf, &line_len, &context.read_h) < 0) { /* line breaking must have failed -- consume the rest * and proceed to a new request */ ERR("Command expected/n"); goto consume; } context.line_no++; if (line_len == 0) { DBG("Empty command received/n"); goto consume; } if (line_len < 3) { ERR("Command must have at least 3 chars/n"); goto consume; } if (*buf != CMD_SEPARATOR) { ERR("Command must begin with %c: %.*s/n", CMD_SEPARATOR, line_len, buf); goto consume; } context.method = buf + 1; file_sep = strchr(context.method, CMD_SEPARATOR); if (file_sep == NULL) { ERR("File separator missing/n"); goto consume; } if (file_sep == context.method) { ERR("Empty command/n"); goto consume; } if (*(file_sep + 1) == 0) context.reply_file = NULL; else { context.reply_file = file_sep + 1; context.reply_file = trim_filename(context.reply_file); if (context.reply_file == 0) { ERR("Trimming filename/n"); goto consume; } } /* make command zero-terminated */ *file_sep = 0; //.........这里部分代码省略.........
开发者ID:adubovikov,项目名称:kamailio,代码行数:101,
注:本文中的trim_filename函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ trim_len函数代码示例 C++ trimString函数代码示例 |