File abctab2ps-stringconversion.patch of Package abctab2ps

diff -up abctab2ps-1.9.0/src/abctab2ps.cpp.orig abctab2ps-1.9.0/src/abctab2ps.cpp
--- abctab2ps-1.9.0/src/abctab2ps.cpp.orig	2024-04-08 18:12:15.000000000 +0200
+++ abctab2ps-1.9.0/src/abctab2ps.cpp	2025-03-09 10:37:27.732710627 +0100
@@ -288,7 +288,7 @@ int main(int argc, char **argv)
         if ((!strcmp(ext,"ps"))||(!strcmp(ext,"eps"))) continue;
 
         if ((fin = fopen (in_file[j],"r")) == NULL) {      
-          if (!strcmp(ext,"")) strext (in_file[j],in_file[j],"abc",1);
+          if (!strcmp(ext,"")) strext (in_file[j],in_file[j],(char *)"abc",1);
           if ((fin = fopen (in_file[j],"r")) == NULL) { 
             printf ("++++ Cannot open input file: %s\n", in_file[j]);
             continue;
@@ -310,8 +310,8 @@ int main(int argc, char **argv)
       
     else {
       if (!epsf) {
-        strext (outf, outf, "ps", 1);
-        if (choose_outname) strext (outf, in_file[j], "ps", 1);
+        strext (outf, outf, (char *)"ps", 1);
+        if (choose_outname) strext (outf, in_file[j], (char *)"ps", 1);
         open_output_file(outf,in_file[j]);
       }
       printf ("%s: ", in_file[j]); 
diff -up abctab2ps-1.9.0/src/format.cpp.orig abctab2ps-1.9.0/src/format.cpp
--- abctab2ps-1.9.0/src/format.cpp.orig	2022-10-25 18:01:22.000000000 +0200
+++ abctab2ps-1.9.0/src/format.cpp	2025-03-09 10:39:34.508123822 +0100
@@ -22,14 +22,14 @@
  */
 struct PAPERSIZE papersizes[] = {
   /* name,   pagewidth, pageheight, leftmargin, staffwidth */
-  {"a4",       21.0*CM,    29.7*CM,     1.8*CM,   17.4*CM},
-  {"letter",   21.6*CM,    27.9*CM,     1.8*CM,   18.0*CM},
-  {"a5",       14.8*CM,    21.0*CM,     1.4*CM,   12.0*CM},
-  {"folio",    21.6*CM,    33.0*CM,     1.8*CM,   18.0*CM},
-  {"quarto",   21.5*CM,    27.5*CM,     1.8*CM,   17.9*CM},
-  {"legal",    21.6*CM,    35.6*CM,     1.8*CM,   18.0*CM},
-  {"executive",19.0*CM,    25.4*CM,     1.5*CM,   16.0*CM},
-  {"tabloid",  27.9*CM,    43.2*CM,     2.0*CM,   23.9*CM},
+  {(char *)"a4",       21.0*CM,    29.7*CM,     1.8*CM,   17.4*CM},
+  {(char *)"letter",   21.6*CM,    27.9*CM,     1.8*CM,   18.0*CM},
+  {(char *)"a5",       14.8*CM,    21.0*CM,     1.4*CM,   12.0*CM},
+  {(char *)"folio",    21.6*CM,    33.0*CM,     1.8*CM,   18.0*CM},
+  {(char *)"quarto",   21.5*CM,    27.5*CM,     1.8*CM,   17.9*CM},
+  {(char *)"legal",    21.6*CM,    35.6*CM,     1.8*CM,   18.0*CM},
+  {(char *)"executive",19.0*CM,    25.4*CM,     1.5*CM,   16.0*CM},
+  {(char *)"tabloid",  27.9*CM,    43.2*CM,     2.0*CM,   23.9*CM},
   {0,                0,          0,          0,         0}
 };
 
@@ -138,19 +138,19 @@ void set_standard_format (struct FORMAT
   f->strict1                =   0.5;
   f->strict2                =   0.8;
   f->indent                 =   0.0;
-  fontspec (&f->titlefont,     "Times-Roman",    15.0, 0); 
-  fontspec (&f->subtitlefont,  "Times-Roman",    12.0, 0); 
-  fontspec (&f->composerfont,  "Times-Italic",   11.0, 0); 
-  fontspec (&f->partsfont,     "Times-Roman",    11.0, 0); 
-  fontspec (&f->tempofont,     "Times-Bold",     10.0, 0); 
-  fontspec (&f->vocalfont,     "Times-Roman",    14.0, 0); 
-  fontspec (&f->textfont,      "Times-Roman",    12.0, 0); 
-  fontspec (&f->wordsfont,     "Times-Roman",    12.0, 0); 
-  fontspec (&f->gchordfont,    "Helvetica",      12.0, 0); 
-  fontspec (&f->voicefont,     "Times-Roman",    12.0, 0); 
-  fontspec (&f->barnumfont,    "Times-Italic",   12.0, 0); 
-  fontspec (&f->barlabelfont,  "Times-Bold",     18.0, 0); 
-  fontspec (&f->indexfont,     "Times-Roman",    11.0, 0); 
+  fontspec (&f->titlefont,     (char *)"Times-Roman",    15.0, 0);
+  fontspec (&f->subtitlefont,  (char *)"Times-Roman",    12.0, 0);
+  fontspec (&f->composerfont,  (char *)"Times-Italic",   11.0, 0);
+  fontspec (&f->partsfont,     (char *)"Times-Roman",    11.0, 0);
+  fontspec (&f->tempofont,     (char *)"Times-Bold",     10.0, 0);
+  fontspec (&f->vocalfont,     (char *)"Times-Roman",    14.0, 0);
+  fontspec (&f->textfont,      (char *)"Times-Roman",    12.0, 0);
+  fontspec (&f->wordsfont,     (char *)"Times-Roman",    12.0, 0);
+  fontspec (&f->gchordfont,    (char *)"Helvetica",      12.0, 0);
+  fontspec (&f->voicefont,     (char *)"Times-Roman",    12.0, 0);
+  fontspec (&f->barnumfont,    (char *)"Times-Italic",   12.0, 0);
+  fontspec (&f->barlabelfont,  (char *)"Times-Bold",     18.0, 0);
+  fontspec (&f->indexfont,     (char *)"Times-Roman",    11.0, 0);
   if (vb>=10) printf ("Loading format \"%s\"\n",f->name);
 }
 
@@ -170,16 +170,16 @@ void set_pretty_format (struct FORMAT *f
   f->scale                  =   0.75;
   f->maxshrink              =   0.55;
   f->parskipfac             =   0.1;
-  fontspec (&f->titlefont,     "Times-Roman",    18.0, 0); 
-  fontspec (&f->subtitlefont,  "Times-Roman",    15.0, 0); 
-  fontspec (&f->composerfont,  "Times-Italic",   12.0, 0); 
-  fontspec (&f->partsfont,     "Times-Roman",    12.0, 0); 
-  fontspec (&f->tempofont,     "Times-Bold",     10.0, 0); 
-  fontspec (&f->vocalfont,     "Times-Roman",    14.0, 0); 
-  fontspec (&f->textfont,      "Times-Roman",    10.0, 0); 
-  fontspec (&f->wordsfont,     "Times-Roman",    10.0, 0); 
-  fontspec (&f->gchordfont,    "Helvetica",      12.0, 0); 
-  fontspec (&f->voicefont,     "Times-Roman",    12.0, 0); 
+  fontspec (&f->titlefont,     (char *)"Times-Roman",    18.0, 0);
+  fontspec (&f->subtitlefont,  (char *)"Times-Roman",    15.0, 0);
+  fontspec (&f->composerfont,  (char *)"Times-Italic",   12.0, 0);
+  fontspec (&f->partsfont,     (char *)"Times-Roman",    12.0, 0);
+  fontspec (&f->tempofont,     (char *)"Times-Bold",     10.0, 0);
+  fontspec (&f->vocalfont,     (char *)"Times-Roman",    14.0, 0);
+  fontspec (&f->textfont,      (char *)"Times-Roman",    10.0, 0);
+  fontspec (&f->wordsfont,     (char *)"Times-Roman",    10.0, 0);
+  fontspec (&f->gchordfont,    (char *)"Helvetica",      12.0, 0);
+  fontspec (&f->voicefont,     (char *)"Times-Roman",    12.0, 0);
 }
 
 /* ----- set_pretty2_format ----- */
@@ -200,18 +200,18 @@ void set_pretty2_format (struct FORMAT *
   f->maxshrink              =   0.55;
   f->titleleft              =   1;
   f->parskipfac             =   0.1;
-  fontspec (&f->titlefont,     "Helvetica-Bold", 16.0, 0); 
-  fontspec (&f->subtitlefont,  "Helvetica-Bold", 13.0, 0); 
-  fontspec (&f->composerfont,  "Helvetica",      10.0, 0); 
-  fontspec (&f->partsfont,     "Times-Roman",    12.0, 0); 
-  fontspec (&f->tempofont,     "Times-Bold",     10.0, 0); 
-  fontspec (&f->vocalfont,     "Times-Roman",    14.0, 0); 
-  fontspec (&f->textfont,      "Times-Roman",    10.0, 0); 
-  fontspec (&f->wordsfont,     "Times-Roman",    10.0, 0); 
-  fontspec (&f->gchordfont,    "Helvetica",      12.0, 0); 
-  fontspec (&f->voicefont,     "Times-Roman",    12.0, 0); 
-  fontspec (&f->barnumfont,    "Times-Roman",    11.0, 1); 
-  fontspec (&f->barlabelfont,  "Times-Bold",     18.0, 1); 
+  fontspec (&f->titlefont,     (char *)"Helvetica-Bold", 16.0, 0);
+  fontspec (&f->subtitlefont,  (char *)"Helvetica-Bold", 13.0, 0);
+  fontspec (&f->composerfont,  (char *)"Helvetica",      10.0, 0);
+  fontspec (&f->partsfont,     (char *)"Times-Roman",    12.0, 0);
+  fontspec (&f->tempofont,     (char *)"Times-Bold",     10.0, 0);
+  fontspec (&f->vocalfont,     (char *)"Times-Roman",    14.0, 0);
+  fontspec (&f->textfont,      (char *)"Times-Roman",    10.0, 0);
+  fontspec (&f->wordsfont,     (char *)"Times-Roman",    10.0, 0);
+  fontspec (&f->gchordfont,    (char *)"Helvetica",      12.0, 0);
+  fontspec (&f->voicefont,     (char *)"Times-Roman",    12.0, 0);
+  fontspec (&f->barnumfont,    (char *)"Times-Roman",    11.0, 1);
+  fontspec (&f->barlabelfont,  (char *)"Times-Bold",     18.0, 1);
 }
 
 
diff -up abctab2ps-1.9.0/src/music.cpp.orig abctab2ps-1.9.0/src/music.cpp
--- abctab2ps-1.9.0/src/music.cpp.orig	2024-04-08 18:08:31.000000000 +0200
+++ abctab2ps-1.9.0/src/music.cpp	2025-03-09 10:52:04.600226265 +0100
@@ -1754,7 +1754,7 @@ void draw_timesig (float x, struct SYMBO
   if (s.invis) return;
 
   const char* historic;
-  if (cfmt.historicstyle) historic="h"; else historic="";
+  if (cfmt.historicstyle) historic=(char *)"h"; else historic=(char *)"";
   if (s.w==1) 
     PUT2("%.1f csig%s\n", x, historic);
   else if (s.w==2) 
@@ -2005,8 +2005,8 @@ void draw_endings (void)
   float gchy,top;
 
 
-  if (cfmt.endingdots) dot=".";
-  else dot="";
+  if (cfmt.endingdots) dot=(char *)".";
+  else dot=(char *)"";
 
   for (i=0;i<num_ending;i++) {
 
@@ -2273,11 +2273,11 @@ void draw_basic_note (float x, float w,
   float dotx,doty,xx,dx,avail,add,fac;
   const char* historic;
 
-  if (cfmt.historicstyle) historic = "h"; else historic = "";
+  if (cfmt.historicstyle) historic = (char *)"h"; else historic = (char *)"";
   /* diamond shaped notes are like historic note heads */
   for (i=0; i<s->dc.n; i++) {
     if (s->dc.t[i] == D_DIAMOND) {
-      historic = "h";
+      historic = (char *)"h";
       break;
     }
   }
@@ -2641,12 +2641,12 @@ float draw_note (float x, float w, float
     }
   }
   
-  if (cfmt.historicstyle) historic = "h"; else historic = "";
+  if (cfmt.historicstyle) historic = (char *)"h"; else historic = (char *)"";
 
   /* unlike in historicstyle, diamond shaped notes require s(u|d}d instead of s(u|d)h */
   for (i=0; i<s->dc.n; i++) {
     if (s->dc.t[i] == D_DIAMOND) {
-      historic = "d";
+      historic = (char *)"d";
       break;
     }
   }
@@ -4859,7 +4859,7 @@ void process_pscomment (FILE *fpin, FILE
     if (*(line+nch))
       add_to_text_block (line+nch+1,1);
     else
-      add_to_text_block ("",1);
+      add_to_text_block ((char *)"",1);
     if (!strcmp(w,"text"))
       write_text_block (fp,OBEYLINES);
     else if (!strcmp(w,"right"))
diff -up abctab2ps-1.9.0/src/subs.cpp.orig abctab2ps-1.9.0/src/subs.cpp
--- abctab2ps-1.9.0/src/subs.cpp.orig	2024-04-08 18:08:31.000000000 +0200
+++ abctab2ps-1.9.0/src/subs.cpp	2025-03-09 10:57:00.799338763 +0100
@@ -421,7 +421,7 @@ int parse_args (int ac, char **av)
                   printf ("Wrong extension for output file: %s\n", aaa);
                   return 1;
                 }
-                strext (outf, aaa, "ps", 1);
+                strext (outf, aaa, (char *)"ps", 1);
                 choose_outname=0;
               }
             }
@@ -450,10 +450,10 @@ int parse_args (int ac, char **av)
             if (c=='F') strnzcpy(styf, aaa, STRLFILE);
             if (c=='D') strnzcpy (styd, aaa, STRLFILE);
             if (c=='g') {
-              if      (abbrev(aaa,"shrink", 2)) gmode=G_SHRINK;
-              else if (abbrev(aaa,"stretch",2)) gmode=G_STRETCH;
-              else if (abbrev(aaa,"space",  2)) gmode=G_SPACE;
-              else if (abbrev(aaa,"fill",   2)) gmode=G_FILL;
+              if      (abbrev(aaa,(char *)"shrink", 2)) gmode=G_SHRINK;
+              else if (abbrev(aaa,(char *)"stretch",2)) gmode=G_STRETCH;
+              else if (abbrev(aaa,(char *)"space",  2)) gmode=G_SPACE;
+              else if (abbrev(aaa,(char *)"fill",   2)) gmode=G_FILL;
               else {
                 printf ("+++ Bad parameter for flag -g: %s\n",aaa);
                 return 1;
@@ -519,7 +519,7 @@ void process_cmdline (char *line)
   char** av;
   int allocav=10;
   char* ap;
-  const char* whitespace=" \t\n";
+  const char* whitespace=(char *)" \t\n";
   char* linecopy;
 
   linecopy = strdup(line);
@@ -743,10 +743,10 @@ int set_page_format (void)
   else 
     set_standard_format (&cfmt);
 
-  i=read_fmt_file ("fonts.fmt", styd, &cfmt);
+  i=read_fmt_file ((char *)"fonts.fmt", styd, &cfmt);
   j=0;
   if (strlen(styf)>0) {
-    strext(styf,styf,"fmt",1);
+    strext(styf,styf,(char *)"fmt",1);
     j=read_fmt_file (styf, styd, &cfmt);
     if (j==0)  {
       printf ("\n+++ Cannot open file: %s\n", styf);
@@ -1309,9 +1309,9 @@ void put_history (FILE *fp)
     bskip(parskip);
   }
 
-  put_text (fp, TEXT_D, "Discography: ");
-  put_text (fp, TEXT_N, "Notes: ");
-  put_text (fp, TEXT_Z, "Transcription: ");
+  put_text (fp, TEXT_D, (char *)"Discography: ");
+  put_text (fp, TEXT_N, (char *)"Notes: ");
+  put_text (fp, TEXT_Z, (char *)"Transcription: ");
   
   ok=0;
   for (i=0;i<ntext;i++) {
@@ -1555,9 +1555,9 @@ void write_heading (FILE *fp)
       PUT1("%.1f 0 M (", lwidth);
       put_str (info.comp[i]);
       if ((i==ncl-1)&&(strlen(info.orig)>0)) {
-        put_str (" (");
+        put_str ((char *)" (");
         put_str (info.orig);
-        put_str (")");
+        put_str ((char *)")");
       }
       PUT0 (") lshow\n");
     }
openSUSE Build Service is sponsored by