]> git.pld-linux.org Git - packages/linux_logo.git/blame - linux_logo-quote_logo_backslashes.patch
- updated for 5.02
[packages/linux_logo.git] / linux_logo-quote_logo_backslashes.patch
CommitLineData
6fb3a390 1--- linux_logo-4.04/linux_logo.h.orig Sun Jul 14 20:40:59 2002
2+++ linux_logo-4.04/linux_logo.h Sat Aug 24 20:41:53 2002
3@@ -15,6 +15,7 @@
4 int display_usertext;
5 int custom_format;
6 int pretty_output;
7+ int quote_logo_backslashes;
8 int center_sysinfo;
9 char *user_text;
10 char *format;
85514a2c
JB
11--- linux_logo-5.02/linux_logo.c.orig 2007-07-31 17:25:16.000000000 +0200
12+++ linux_logo-5.02/linux_logo.c 2007-08-12 18:39:15.984510248 +0200
14856d14
JB
13@@ -102,6 +102,7 @@
14 settings->display_sysinfo_only=0;
15 settings->display_usertext=0;
16 settings->custom_format=0;
17+ settings->quote_logo_backslashes=0;
18 settings->center_sysinfo=1;
19 settings->user_text[0]=0;
20 settings->format[0]=0;
85514a2c 21@@ -125,13 +126,15 @@
14856d14
JB
22 }
23
24 /* Prints a string, but stops at a newline or end of string */
25-static char *print_line(char *string) {
26+static char *print_line(char *string, struct linux_logo_info_type *settings) {
27
28 char *temp_st=string;
85514a2c
JB
29
30 if (temp_st==NULL) return NULL;
14856d14
JB
31
32 while ((*temp_st!='\n') && (*temp_st!='\0')) {
33+ if('\\' == *temp_st && settings->quote_logo_backslashes)
34+ putchar('\\');
35 putchar(*temp_st);
36 temp_st++;
37 }
85514a2c 38@@ -518,7 +521,7 @@
14856d14
JB
39 if (settings->banner_mode) { /* Banner mode */
40 for(i=0;i<ysize;i++) {
41 shift_right((settings->width-80)/2,settings->plain_ascii);
42- string_point=print_line(string_point);
43+ string_point=print_line(string_point, settings);
44 printf("\n");
45 }
46 if (!settings->display_logo_only) printf("\n");
85514a2c 47@@ -535,14 +538,14 @@
14856d14
JB
48
49 for(i=0;i<7;i++) {
50 shift_right(settings->offset,settings->plain_ascii);
51- string_point=print_line(string_point);
52+ string_point=print_line(string_point, settings);
53 printf("\n");
54 }
55
56 /* The next lines can have cpuinfo after them */
57 for(i=7;i<ysize;i++) {
58 shift_right(settings->offset,settings->plain_ascii);
59- string_point=print_line(string_point);
60+ string_point=print_line(string_point, settings);
61 shift_right(2,settings->plain_ascii);
62 if (i-7<sysinfo_length) {
63 if (!settings->plain_ascii) printf("\033[1;37;40m");
85514a2c 64@@ -864,6 +867,8 @@
14856d14
JB
65 break;
66 case 'p': settings->preserve_xy=1;
67 break;
68+ case 'q': settings->quote_logo_backslashes=1;
69+ break;
70 case 's': settings->skip_bogomips=1;
71 break;
72 case 't': argument=get_arg(&index,argc,argv);
This page took 0.094604 seconds and 4 git commands to generate.