• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ output_string函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中output_string函数的典型用法代码示例。如果您正苦于以下问题:C++ output_string函数的具体用法?C++ output_string怎么用?C++ output_string使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了output_string函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: output_string_key

static int
output_string_key(char *string, int width, format_key_t *key)
{
	if (strlen(string) == 0)
		string = key_empty(key);
	return output_string(string, width, key_align(key));
}
开发者ID:Distrotech,项目名称:radius,代码行数:7,代码来源:printutmp.c


示例2: dumpsw

/**
 * dump switch table
 */
dumpsw(loop_t *loop) {
        int     i,j;

        data_segment_gdata ();
        generate_label (loop->body_label);
        if (loop->test_label != swstp) {
                j = loop->test_label;
                while (j < swstp) {
                        gen_def_word ();
                        i = 4;
                        while (i--) {
                                output_number (swstcase[j]);
                                output_byte (',');
                                print_label (swstlab[j++]);
                                if ((i == 0) | (j >= swstp)) {
                                        newline ();
                                        break;
                                }
                                output_byte (',');
                        }
                }
        }
        gen_def_word ();
        print_label (loop->cont_label);
        output_string (",0");
        newline ();
        code_segment_gtext ();
}
开发者ID:AtomSoftTech,项目名称:retrobsd,代码行数:31,代码来源:stmt.c


示例3: header

/**
 * print all assembler info before any code is generated
 */
void header (void) {
    output_string ("; Small C Debug\n;\tCoder (ac0)\n;");
    frontend_version();
    newline ();
    output_line ("\t;program area SMALLC_GENERATED is RELOCATABLE");
    output_line ("\t.module SMALLC_GENERATED");
}
开发者ID:EtchedPixels,项目名称:FUZIX,代码行数:10,代码来源:codegeneric.c


示例4: parse_timings_v1

static
void parse_timings_v1(confword_t* data)
{
    mgconf_core_freq = &data[0];

    if (!verbose_boot)
        return;

    output_string("timings\n"
                  "   core frequency: ", 2);
    output_uint(data[0], 2);
    output_string("MHz\n"
                  "   external memory bandwidth: ", 2);
    output_uint(data[1], 2);
    output_string(" x 1E6 bytes/s\n", 2);
}
开发者ID:andreimatei,项目名称:hydra-run-time,代码行数:16,代码来源:mtconf.c


示例5: gen_call

/**
 * call the specified subroutine name
 * @param sname subroutine name
 */
void gen_call(char *sname) {
    output_with_tab ("call ");
    output_string (sname);
    output_byte(',');
    output_number(args);
    newline ();
}
开发者ID:EtchedPixels,项目名称:FUZIX,代码行数:11,代码来源:codegeneric.c


示例6: main

// XIGNORE: *:D
int main(int argc, const char **argv) {
   output_int(argc, 1);
   output_char('\n', 1);
   output_string(argv[0], 1);
   output_char('\n',1);
   return 0;
}
开发者ID:fuzzie,项目名称:slcore,代码行数:8,代码来源:main2.c


示例7: dumpglbs

/**
 * dump all static variables
 */
void dumpglbs(void) {
    int dim, i, list_size, line_count, value;
    if (!glbflag)
        return;
    current_symbol_table_idx = rglobal_table_index;
    while (current_symbol_table_idx < global_table_index) {
        SYMBOL *symbol = &symbol_table[current_symbol_table_idx];
        if (symbol->identity != FUNCTION) {
            ppubext(symbol);
            if (symbol->storage != EXTERN) {
                output_string(symbol->name);
                output_label_terminator();
                dim = symbol->offset;
                list_size = 0;
                line_count = 0;
                if (find_symbol_initials(symbol->name)) { // has initials
                    list_size = get_size(symbol->name);
                    if (dim == -1) {
                        dim = list_size;
                    }
                }
                for (i=0; i<dim; i++) {
                    if (symbol->type == STRUCT) {
                        dump_struct(symbol, i);
                    } else {
                        if (line_count % 10 == 0) {
                            newline();
                            if ((symbol->type & CINT) || (symbol->identity == POINTER)) {
                                gen_def_word();
                            } else {
                                gen_def_byte();
                            }
                        }
                        if (i < list_size) {
                            // dump data
                            value = get_item_at(symbol->name, i, &tag_table[symbol->tagidx]);
                            output_number(value);
                        } else {
                            // dump zero, no more data available
                            output_number(0);
                        }
                        line_count++;
                        if (line_count % 10 == 0) {
                            line_count = 0;
                        } else {
                            if (i < dim-1) {
                                output_byte( ',' );
                            }
                        }
                    }
                }
                newline();
            }
        } else {
            fpubext(symbol);
        }
        current_symbol_table_idx++;
    }
}
开发者ID:JamesLinus,项目名称:FUZIX,代码行数:62,代码来源:main.c


示例8: puts

static int puts(FILE *fp, const char *s) {
  SkunkConsole *co = fp->data;
  if(co != NULL) {
    output_string(co, s);
    return 0;
  }
  return EOF;
}
开发者ID:sbriais,项目名称:rmvlib,代码行数:8,代码来源:open_skunk_console.c


示例9: needbrack

/**
 * enforces bracket
 * @param str
 * @return 
 */
void needbrack(char *str) {
    if (!match (str)) {
        error ("missing bracket");
        gen_comment ();
        output_string (str);
        newline ();
    }
}
开发者ID:EtchedPixels,项目名称:FUZIX,代码行数:13,代码来源:lex.c


示例10: callstk

/**
 * perform subroutine call to value on top of stack
 */
void callstk(void) {
    gen_immediate ();
    output_string ("#.+5");
    newline ();
    gen_swap_stack ();
    output_line ("pchl");
    stkp = stkp + INTSIZE;
}
开发者ID:beretta42,项目名称:FUZIX,代码行数:11,代码来源:code8080.c


示例11: added

static void
added (guestfs_h *g, struct file *file)
{
    output_start_line ();
    output_string ("+");
    output_file (g, file);
    output_end_line ();
}
开发者ID:kelledge,项目名称:libguestfs,代码行数:8,代码来源:diff.c


示例12: erase_string

void erase_string(string& in_string,unsigned int erase_point,unsigned int erase_length) {
    if (in_string.empty()) return;
    if (!(in_string.length()>=erase_point+erase_length)) return;

    string output_string(in_string.substr(0,erase_point));
    output_string+=in_string.substr(erase_point+erase_length,in_string.length());
    in_string=output_string;
}
开发者ID:lcatro,项目名称:network_backdoor_scanner,代码行数:8,代码来源:resolver_string.cpp


示例13: net_service

static BOOL net_service(int operation, const WCHAR* service_name)
{
    SC_HANDLE SCManager, serviceHandle;
    BOOL result = 0;
    WCHAR service_display_name[4096];
    DWORD buffer_size;

    SCManager = OpenSCManagerW(NULL, NULL, SC_MANAGER_ALL_ACCESS);
    if(!SCManager)
    {
        output_string(STRING_NO_SCM);
        return FALSE;
    }
    serviceHandle = OpenServiceW(SCManager, service_name, SC_MANAGER_ALL_ACCESS);
    if(!serviceHandle)
    {
        output_string(STRING_NO_SVCHANDLE);
        CloseServiceHandle(SCManager);
        return FALSE;
    }

    buffer_size = sizeof(service_display_name)/sizeof(*service_display_name);
    GetServiceDisplayNameW(SCManager, service_name, service_display_name, &buffer_size);
    if (!service_display_name[0]) lstrcpyW(service_display_name, service_name);

    switch(operation)
    {
    case NET_START:
        output_string(STRING_START_SVC, service_display_name);
        result = StartServiceW(serviceHandle, 0, NULL);

        if(result) output_string(STRING_START_SVC_SUCCESS, service_display_name);
        else
        {
            if (!output_error_string(GetLastError()))
                output_string(STRING_START_SVC_FAIL, service_display_name);
        }
        break;
    case NET_STOP:
        output_string(STRING_STOP_SVC, service_display_name);
        result = StopService(SCManager, serviceHandle);

        if(result) output_string(STRING_STOP_SVC_SUCCESS, service_display_name);
        else
        {
            if (!output_error_string(GetLastError()))
                output_string(STRING_STOP_SVC_FAIL, service_display_name);
        }
        break;
    }

    CloseServiceHandle(serviceHandle);
    CloseServiceHandle(SCManager);
    return result;
}
开发者ID:aragaer,项目名称:wine,代码行数:55,代码来源:net.c


示例14: gen_get_memory

/**
 * fetch a static memory cell into the primary register
 * @param sym
 */
void gen_get_memory(SYMBOL *sym) {
    if ((sym->identity != POINTER) && (sym->type == CCHAR)) {
        output_with_tab ("lda\t");
        output_string (sym->name);
        newline ();
        gen_call ("ccsxt");
    } else if ((sym->identity != POINTER) && (sym->type == UCHAR)) {
        output_with_tab("lda\t");
        output_string(sym->name);
        newline();
        output_line("mov \tl,a");
        output_line("mvi \th,#0");
    } else {
        output_with_tab ("lhld\t");
        output_string (sym->name);
        newline ();
    }
}
开发者ID:beretta42,项目名称:FUZIX,代码行数:22,代码来源:code8080.c


示例15: parse_layout_v1

static
void parse_layout_v1(confword_t* data)
{
    mgconf_layout_data = &data[0];
    if (!verbose_boot)
        return;

    output_string("place layout\n", 2);
}
开发者ID:andreimatei,项目名称:hydra-run-time,代码行数:9,代码来源:mtconf.c


示例16: header

/**
 * print all assembler info before any code is generated
 */
void header (void) {
    output_string ("; Small C 8080\n;\tCoder (2.4,84/11/27)\n;");
    frontend_version();
    newline ();
    output_line ("\t;program area SMALLC_GENERATED is RELOCATABLE");
    output_line ("\t.module SMALLC_GENERATED");
    output_line ("\t.list   (err, loc, bin, eqt, cyc, lin, src, lst, md)");
    output_line ("\t.nlist  (pag)");
}
开发者ID:beretta42,项目名称:FUZIX,代码行数:12,代码来源:code8080.c


示例17: reg_query

static int reg_query(WCHAR *key_name, WCHAR *value_name, BOOL value_empty,
    BOOL subkey)
{
    static const WCHAR stubW[] = {'S','T','U','B',' ','Q','U','E','R','Y',' ',
        '-',' ','%','1',' ','%','2',' ','%','3','!','d','!',' ','%','4','!','d','!','\n',0};
    output_string(stubW, key_name, value_name, value_empty, subkey);

    return 1;
}
开发者ID:Endle,项目名称:wine-gsoc,代码行数:9,代码来源:reg.c


示例18: gen_put_memory

/**
 * asm - store the primary register into the specified static memory cell
 * @param sym
 */
void gen_put_memory(SYMBOL *sym) {
    if ((sym->identity != POINTER) && (sym->type & CCHAR)) {
        output_line ("mov \ta,l");
        output_with_tab ("sta \t");
    } else {
        output_with_tab ("shld\t");
    }
    output_string (sym->name);
    newline ();
}
开发者ID:beretta42,项目名称:FUZIX,代码行数:14,代码来源:code8080.c


示例19: net_enum_services

static BOOL net_enum_services(void)
{
    static const WCHAR runningW[]={' ',' ',' ',' ','%','s','\n',0};
    SC_HANDLE SCManager;
    LPENUM_SERVICE_STATUS_PROCESSW services;
    DWORD size, i, count, resume;
    BOOL success = FALSE;

    SCManager = OpenSCManagerW(NULL, NULL, SC_MANAGER_ALL_ACCESS);
    if(!SCManager)
    {
        output_string(STRING_NO_SCM);
        return FALSE;
    }

    EnumServicesStatusExW(SCManager, SC_ENUM_PROCESS_INFO, SERVICE_WIN32, SERVICE_ACTIVE, NULL, 0, &size, &count, NULL, NULL);
    if(GetLastError() != ERROR_MORE_DATA)
    {
        output_error_string(GetLastError());
        goto end;
    }
    services = HeapAlloc(GetProcessHeap(), 0, size);
    resume = 0;
    if(!EnumServicesStatusExW(SCManager, SC_ENUM_PROCESS_INFO, SERVICE_WIN32, SERVICE_ACTIVE, (LPBYTE)services, size, &size, &count, &resume, NULL))
    {
        output_error_string(GetLastError());
        goto end;
    }
    output_string(STRING_RUNNING_HEADER);
    for(i = 0; i < count; i++)
    {
        output_printf(runningW, services[i].lpDisplayName);
        WINE_TRACE("service=%s state=%d controls=%x\n",
                   wine_dbgstr_w(services[i].lpServiceName),
                   services[i].ServiceStatusProcess.dwCurrentState,
                   services[i].ServiceStatusProcess.dwControlsAccepted);
    }
    success = TRUE;

 end:
    CloseServiceHandle(SCManager);
    return success;
}
开发者ID:aragaer,项目名称:wine,代码行数:43,代码来源:net.c


示例20: dump_member

/*
   Dump insertion points
*/
static void dump_member (member m)
	{ if (is_an_invisible_member (m)) return;
	  switch (m -> tag)
	     { case tag_call: wlog (m -> u.call.nonterminal); break;
	       case tag_terminal: output_string (stderr, m -> u.terminal);
				  break;
	       case tag_semiterminal: wlog ("{}");
	       default: break;
	     };
	};
开发者ID:tjordanchat,项目名称:eag,代码行数:13,代码来源:layout.c



注:本文中的output_string函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ output_warnings函数代码示例发布时间:2022-05-30
下一篇:
C++ output_low函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap