ALT Linux Bugzilla
– Attachment 305 Details for
Bug 3201
Кодировка при выводе на терминал
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
Fixes for terminal output
grip-3.1.2-alt-utf8-terminal.patch (text/plain), 4.39 KB, created by
Dmitry Vukolov
on 2003-10-26 21:27:52 MSK
(
hide
)
Description:
Fixes for terminal output
Filename:
MIME Type:
Creator:
Dmitry Vukolov
Created:
2003-10-26 21:27:52 MSK
Size:
4.39 KB
patch
obsolete
>diff -Nur grip-3.1.2.orig/src/cddev.c grip-3.1.2/src/cddev.c >--- grip-3.1.2.orig/src/cddev.c 2003-07-13 22:04:04 +0400 >+++ grip-3.1.2/src/cddev.c 2003-10-26 03:54:07 +0300 >@@ -268,7 +268,7 @@ > > #ifdef CDIOREADTOCHEADER > if(ioctl(disc->cd_desc,CDIOREADTOCHEADER,(char *)&cdth)<0) { >- printf(_("Error: Failed to read disc contents\n")); >+ g_print(_("Error: Failed to read disc contents\n")); > > return FALSE; > } >@@ -277,7 +277,7 @@ > #endif > #ifdef CDROMREADTOCHDR > if(ioctl(disc->cd_desc,CDROMREADTOCHDR,&cdth)<0) { >- printf(_("Error: Failed to read disc contents\n")); >+ g_print(_("Error: Failed to read disc contents\n")); > > return FALSE; > } >@@ -294,7 +294,7 @@ > cdte.data_len=sizeof(toc_buffer); > > if(ioctl(disc->cd_desc,CDIOREADTOCENTRYS,(char *)&cdte)<0) { >- printf(_("Error: Failed to read disc contents\n")); >+ g_print(_("Error: Failed to read disc contents\n")); > > return FALSE; > } >@@ -321,7 +321,7 @@ > > cdte.cdte_format=CDROM_MSF; > if(ioctl(disc->cd_desc,CDROMREADTOCENTRY,&cdte) < 0) { >- printf(_("Error: Failed to read disc contents\n")); >+ g_print(_("Error: Failed to read disc contents\n")); > > return FALSE; > } >@@ -612,15 +612,15 @@ > /* always unlock door before an eject in case something else locked it */ > #if defined(CDROM_LOCKDOOR) > if(ioctl(disc->cd_desc,CDROM_LOCKDOOR,0)<0) >- printf(_("Unlock failed: %d"), errno); >+ g_print(_("Unlock failed: %d"), errno); > #endif > #ifdef CDIOCALLOW > if(ioctl(disc->cd_desc,CDIOCALLOW)<0) >- printf(_("Unlock failed: %d"),errno); >+ g_print(_("Unlock failed: %d"),errno); > #endif > > if(ioctl(disc->cd_desc,CDIOCEJECT)<0) { >- printf(_("CDIOCEJECT")); >+ g_print(_("CDIOCEJECT")); > return FALSE; > } > #endif >diff -Nur grip-3.1.2.orig/src/cdplay.c grip-3.1.2/src/cdplay.c >--- grip-3.1.2.orig/src/cdplay.c 2003-10-02 04:34:09 +0400 >+++ grip-3.1.2/src/cdplay.c 2003-10-26 03:54:07 +0300 >@@ -222,7 +222,7 @@ > success=TRUE; > > if(DiscDBWriteDiscData(disc,ddata,NULL,TRUE,FALSE)<0) >- printf(_("Error saving disc data\n")); >+ g_print(_("Error saving disc data\n")); > > ginfo->update_required=TRUE; > ginfo->is_new_disc=TRUE; >diff -Nur grip-3.1.2.orig/src/grip.c grip-3.1.2/src/grip.c >--- grip-3.1.2.orig/src/grip.c 2003-10-02 05:51:16 +0400 >+++ grip-3.1.2/src/grip.c 2003-10-26 03:54:07 +0300 >@@ -177,7 +177,7 @@ > ginfo->do_redirect=!no_redirect; > > if(!CDInitDevice(ginfo->cd_device,&(ginfo->disc))) { >- printf(_("Error: Unable to initialize [%s]\n"),ginfo->cd_device); >+ g_print(_("Error: Unable to initialize [%s]\n"),ginfo->cd_device); > exit(0); > } > >diff -Nur grip-3.1.2.orig/src/id3.c grip-3.1.2/src/id3.c >--- grip-3.1.2.orig/src/id3.c 2003-10-02 04:34:09 +0400 >+++ grip-3.1.2/src/id3.c 2003-10-26 03:56:45 +0300 >@@ -284,7 +284,7 @@ > > default: > /* Doh! */ >- fprintf( stderr,_("unknown ID3 field\n")); >+ g_printerr(_("unknown ID3 field\n")); > break; > } > >diff -Nur grip-3.1.2.orig/src/launch.c grip-3.1.2/src/launch.c >--- grip-3.1.2.orig/src/launch.c 2003-07-13 22:04:51 +0400 >+++ grip-3.1.2/src/launch.c 2003-10-26 03:54:07 +0300 >@@ -117,7 +117,7 @@ > } > > if(!pwd) >- printf(_("Error: unable to translate filename. No such user as %s\n"), >+ g_print(_("Error: unable to translate filename. No such user as %s\n"), > tok); > else { > g_string_sprintf(outstr,"%s",pwd->pw_dir); >diff -Nur grip-3.1.2.orig/src/main.c grip-3.1.2/src/main.c >--- grip-3.1.2.orig/src/main.c 2003-10-02 04:34:09 +0400 >+++ grip-3.1.2/src/main.c 2003-10-26 04:05:48 +0300 >@@ -132,11 +132,16 @@ > void Debug(char *fmt,...) > { > va_list args; >+ char *msg; > > if(do_debug) { > va_start(args,fmt); > >- vfprintf(stderr,fmt,args); >+ msg=g_strdup_vprintf(fmt,args); >+ if(msg) { >+ g_printerr(msg); >+ g_free(msg); >+ } > } > > va_end(args); >diff -Nur grip-3.1.2.orig/src/parsecfg.c grip-3.1.2/src/parsecfg.c >--- grip-3.1.2.orig/src/parsecfg.c 2003-07-13 22:05:00 +0400 >+++ grip-3.1.2/src/parsecfg.c 2003-10-26 03:54:07 +0300 >@@ -55,7 +55,7 @@ > *((int *)cfg[cfgent].destvar)=atoi(tok); > break; > default: >- printf(_("Error: Bad entry type\n")); >+ g_print(_("Error: Bad entry type\n")); > break; > } > >@@ -81,7 +81,7 @@ > tok=strtok(buf," "); > > if(!tok||(strcasecmp(tok,name))) { >- printf(_("Error: Invalid config file\n")); >+ g_print(_("Error: Invalid config file\n")); > > return -1; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 3201
: 305 |
306
|
307
|
308