Displaying 20 results from an estimated 176 matches for "putchar".
Did you mean:
put_char
2009 May 29
1
[PATCH v2] klibc-utils: add simple ls
...{
+ if ((bytes = snprintf(NULL, 0, "%ju", (uintmax_t) st->st_size)) > max_size)
+ max_size = bytes;
+ }
+ return;
+}
+
+static void do_stat(const struct stat *st, const char *path)
+{
+ char *fmt, *link_name;
+ int rc;
+
+ switch (st->st_mode & S_IFMT) {
+ case S_IFBLK: putchar('b'); break;
+ case S_IFCHR: putchar('c'); break;
+ case S_IFDIR: putchar('d'); break;
+ case S_IFIFO: putchar('p'); break;
+ case S_IFLNK: putchar('l'); break;
+ case S_IFSOCK: putchar('s'); break;
+ case S_IFREG: putchar('-'); bre...
2011 May 13
3
[LLVMdev] IO intrinsics?
I found these lines in the BrainF example:
//declare i32 @getchar()
getchar_func = cast<Function>(module->
getOrInsertFunction("getchar", IntegerType::getInt32Ty(C), NULL));
//declare i32 @putchar(i32)
putchar_func = cast<Function>(module->
getOrInsertFunction("putchar", IntegerType::getInt32Ty(C),
IntegerType::getInt32Ty(C), NULL));
Since getchar and putchar are never defined, I'm assuming they are
intrinsics, but they are not documen...
2011 Jul 07
5
[PATCH 0/5] checkpatch cleanups
It seems checkpatch errors krept in, this is a first go.
Next run will go into usr/kinit directory.
No code changes, just codingstyle fixes (verified with size(3)).
maximilian attems (5):
[klibc] sleep: have argument on next line
[klibc] readklink: remove unneeded braces
[klibc] mount: whitespace policy
[klibc] ls: fix various checkpatch complaints
[klibc] tests: checkpatch fixlets
2012 Feb 09
1
[LLVMdev] Difficulty inserting putchar in IR
Hi,
I have written a simple code to insert putchar() function into IR.
It compiled well but when I tried to run the generated .bc file with lli,
its not showing
proper output.
Function *putchar_func = cast<Function>(M->
getOrInsertFunction("putchar", IntegerType::getInt32Ty(Context),
IntegerType::get...
2013 Dec 08
0
[LLVMdev] Win32: Crash in DLL created by llvm that calls into the "putchar" function
Hello list,
I got a simple test case to reproduce a crash in code that has been
generated by llvm. The code calls into the "putchar" function from
LIBCMT.LIB. It works when creating an .exe file, but not when creating
a .dll file and calling into an exported function.
First, let me show how the code works as an .exe:
> cat callPutchar.ll
; ModuleID = 'test'
declare i32 @putchar(i32)
define i32 @main() {
__ent...
2013 Dec 08
1
[LLVMdev] Win32: Crash in DLL created by llvm that calls into the "putchar" function
Hey Jeremy,
(putting the discussion back to the list.)
2013/12/8 Jeremy Lakeman <Jeremy.Lakeman at gmail.com>:
> If I run your demo exe it crashes, if I re-link the dll with VS 2010 it
> errors gracefully;
>
> runtime error R6030
> - CRT not initialized
>
> putchar is a c runtime function.
> I'm betting that your exe doesn't initialise the runtime library?
You're right, this is surely the problem then. Thanks a buch for that pointer.
However, after quite much googling, I can't find a way to correctly
initialize the CRT in a DLL created fro...
2009 Sep 24
1
[PATCH libguestfs] maint: use spaces, not TABs for indentation
...ot; else printf (\" null\");\n"
+ pr " if (%s) printf (\" \\\"%%s\\\"\", %s);\n" n n;
+ pr " else printf (\" null\");\n"
| StringList n
| DeviceList n -> (* string list *)
- pr " putchar (' ');\n";
- pr " putchar ('\"');\n";
- pr " for (i = 0; %s[i]; ++i) {\n" n;
- pr " if (i > 0) putchar (' ');\n";
- pr " fputs (%s[i], stdout);\n" n;
- pr " }\n";
- pr " put...
2011 May 13
0
[LLVMdev] IO intrinsics?
Hi, Hans
> Since getchar and putchar are never defined, I'm assuming they are
> intrinsics, but they are not documented with the rest of the intrinsics. So
> are they intrinsics or something else?
I _guess_ standard functions like getchar/putchar are linked by
default.
Regards,
chenwj
--
Wei-Ren Chen (陳韋任)
Computer Sys...
2011 May 13
1
[LLVMdev] IO intrinsics?
On 05/12/2011 11:08 PM, 陳韋任 wrote:
> Hi, Hans
>
>> Since getchar and putchar are never defined, I'm assuming they are
>> intrinsics, but they are not documented with the rest of the intrinsics. So
>> are they intrinsics or something else?
>
> I _guess_ standard functions like getchar/putchar are linked by
> default.
Indeed, they're coming fr...
2006 Oct 31
0
6266832 UNIX98/UNIX03: getc(), getchar(), putc(), putchar() did not set stream to byte orientation
Author: muffin
Repository: /hg/zfs-crypto/gate
Revision: fecd74c42540dbb707f29987c4b4e10ecff69818
Log message:
6266832 UNIX98/UNIX03: getc(), getchar(), putc(), putchar() did not set stream to byte orientation
Files:
update: usr/src/head/iso/stdio_iso.h
2008 May 27
2
[PATCH] Fixes bug which strips every other digit in klibc-utils dmesg output
...- switch (buf[i]) {
- case '<':
- if (i == 0 || buf[i-1] == '\n')
- i++;
- case '0' ... '9':
- if (i > 0 && buf[i-1] == '<')
- i++;
- case '>':
- if (i > 0 && isdigit(buf[i-1]))
- i++;
- default:
- putchar(buf[i++]);
- }
+ while (buf[i] && i < len) {
+ if (i == 0 || buf[i-1] == '\n')
+ if (buf[i] == '<')
+ if (isdigit(buf[++i]))
+ if (buf[++i] == '>')
+ i++;
+ putchar(buf[i++]);
+ }
if (buf[i-1] != '\n')
putchar('\n');
2010 Aug 04
1
[PATCH] Send trace output to stderr
...t; null\");\n"
+ pr " if (%s) fprintf (stderr, \" \\\"%%s\\\"\", %s);\n" n n;
+ pr " else fprintf (stderr, \" null\");\n"
| StringList n
| DeviceList n -> (* string list *)
- pr " putchar (' ');\n";
- pr " putchar ('\"');\n";
+ pr " fputc (' ', stderr);\n";
+ pr " fputc ('\"', stderr);\n";
pr " for (i = 0; %s[i]; ++i) {\n" n;
- pr "...
2003 Dec 22
1
[LLVMdev] How to explain?
...sbyte*> [#uses=2]
%inc.i = getelementptr sbyte* %Str.0.i, long 1 ;
<sbyte*> [#uses=2]
%tmp.7.i = load sbyte* %Str.0.i ; <sbyte> [#uses=1]
%tmp.8.i = cast sbyte %tmp.7.i to int ; <int> [#uses=1]
%tmp.5.i = call int %putchar( int %tmp.8.i ) ; <int>
[#uses=0]
%tmp.2.i = load sbyte* %inc.i ; <sbyte> [#uses=1]
%tmp.3.i = setne sbyte %tmp.2.i, 0 ; <bool> [#uses=1]
br bool %tmp.3.i, label %no_exit.i1, label %loopexit.i
loopexit.i: ;...
2010 Oct 24
2
[LLVMdev] lli : external functions and target datalayout
Hi All,
I have a C code:
//////////////////////////////
#include "stdio.h"
int main () {
putchar('a');
return 0;
}
llvm-gcc -emit-llvm, I got
////////////////////////////////////////
; ModuleID = 't1.bc'
target datalayout =
"e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32"
target triple = "i...
2016 Apr 04
2
[PATCH 1/2] Use 'error' function consistently throughout.
...exit (EXIT_FAILURE);
- }
+ if (!drv)
+ error (EXIT_FAILURE, errno, "calloc");
drv->type = drv_d;
drv->d.guest = argv[optind];
drv->next = drvs;
@@ -564,10 +559,8 @@ next_field (void)
field++;
if (field == 1) return;
- if (putchar (c) == EOF) {
- perror ("putchar");
- exit (EXIT_FAILURE);
- }
+ if (putchar (c) == EOF)
+ error (EXIT_FAILURE, errno, "putchar");
}
static void
@@ -579,10 +572,8 @@ output_start_line (void)
static void
output_end_line (void)
{
- if (printf ("\n") &l...
2007 Apr 18
0
[Bridge] BCP code ported to pppd 2.4.2
...+ */
+static void
+bcp_addci(f, ucp, lenp)
+ fsm *f;
+ u_char *ucp;
+ int *lenp;
+{
+ bcp_options *go = &bcp_gotoptions[f->unit];
+ int len = *lenp;
+
+#define ADDCIBRIDGELINEID(opt, neg, lan_bridge_segno) \
+ if (neg) { \
+ if (len >= CILEN_BRIDGELINEID) { \
+ PUTCHAR(opt, ucp); \
+ PUTCHAR(CILEN_BRIDGELINEID, ucp); \
+ PUTSHORT(lan_bridge_segno, ucp); \
+ len -= CILEN_BRIDGELINEID; \
+ } else \
+ neg = 0; \
+ }
+
+#define ADDCIMACSUPPORT(opt, neg, macsupport) \
+ if (neg && macsupport) { \
+ if (len >= CILEN_MA...
2020 Mar 02
4
Question about host key algorithms
...thms
>
> ssh -Q HostKeyAlgorithms
>
> That list should contain rsa-sha2-256 and rsa-sha2-512.
> --
> main(a){char*c=/* Schoene Gruesse */"B?IJj;MEH"
> "CX:;",b;for(a/* Best regards my address: */=0;b=c[a++];)
> putchar(b-1/(/* Chris cc -ox -xc - && ./x
> */b/42*2-3)*42);}
>
2013 Apr 23
1
Verbose output from R CMD check
...g platform: x86_64-unknown-linux-gnu (64-bit)
* using session charset: UTF-8
* checking for file ?foobar/DESCRIPTION? ... OK
[LOTS OF '...OK' CHECK REPORTS REMOVED FOR BREVITY]
* checking compiled code ... NOTE
File ?/home/david/foobar/package/foobar.Rcheck/foobar/libs/foobar.so?:
Found ?putchar?, possibly from ?putchar? (C)
Object: ?foobar.o?
Found ?puts?, possibly from ?printf? (C), ?puts? (C)
Object: ?foobar.o?
Compiled code should not call functions which might terminate R nor
write to stdout/stderr instead of to the console.
See ?Writing portable packages? in the ?Writ...
2013 Jul 06
1
[PATCH 1/2] xenstore: don't die on access-denied child nodes in 'xenstore ls'
...+ }
for (i = 0; i<num; i++) {
char buf[MAX_STRLEN(unsigned int)+1];
@@ -172,7 +177,7 @@ static void do_ls(struct xs_handle *h, char *path, int cur_depth, int show_perms
/* Print value */
if (val == NULL) {
- printf(":\n");
+ putchar('':'');
}
else {
if (max_width < (linewid + len + TAG_LEN)) {
@@ -192,12 +197,12 @@ static void do_ls(struct xs_handle *h, char *path, int cur_depth, int show_perms
}
}
}
- free(val);
if (show...
2005 Mar 24
1
Problems with menu.c32, and some feature request for menu.c32
I have found two bugs in the menu.c32 utility, part of the syslinux-3.08-pre5 build, and have a couple of requests.
Problem 1:
If you use the ^ symbol to define a number as a hotkey, ex. MENU LABEL ^1 Option #1 , the menu will not print the number highlighted. It will use it as a hot key, it just will not highlight it. It does highlight the hotkey if specify a letter, A-Z.
Problem 2:
When