ltk

Socket-based GUI for X11 (WIP)
git clone git://lumidify.org/ltk.git (fast, but not encrypted)
git clone https://lumidify.org/git/ltk.git (encrypted, but very slow)
Log | Files | Refs | README | LICENSE

ltkc_img.c (518B)


      1 /* This is just a temporary hack to preprocess an image for sending it to
      2    ltkd. The nicer way for this would be to have a special case for the
      3    "image create" command in ltkc, but I was too lazy to implement that
      4    right now. */
      5 
      6 #include <stdio.h>
      7 
      8 int main(int argc, char *argv[]) {
      9 	(void)argc;
     10 	(void)argv;
     11 	int c;
     12 	while ((c = getchar()) != EOF) {
     13 		switch (c) {
     14 		case '\\':
     15 			fputs("\\\\", stdout);
     16 			break;
     17 		case '"':
     18 			fputs("\\\"", stdout);
     19 			break;
     20 		default:
     21 			putchar(c);
     22 		}
     23 	}
     24 
     25 	return 0;
     26 }