summaryrefslogtreecommitdiff
path: root/x2p/str.c
diff options
context:
space:
mode:
authorAndy Dougherty <doughera@lafcol.lafayette.edu>1995-01-18 02:37:01 +0000
committerAndy Dougherty <doughera@lafcol.lafayette.edu>1995-01-18 02:37:01 +0000
commit9c8d0b29b7bd1493cc1d95591b17902820e5579c (patch)
treef8671d758a3a5d07d4fef72c609650aa9af8f7e1 /x2p/str.c
parentf4cb4c40de81ad9c5a8e775c2298ec5a52130124 (diff)
downloadperl-9c8d0b29b7bd1493cc1d95591b17902820e5579c.tar.gz
perl5.000 patch.0e: fix various non-broken things in the x2p/ directory
This patch fixes various non-broken things in the x2p/ directory. Mostly, I've supplied function prototypes to satisfy particularly picky compilers. I've also updated Makefile.SH to know that the byacc-generated a2p.c is now included with the distribution so that we no longer need to go looking for yacc/bison/byacc and deal with various library issues or command line options to support those various compiler compilers. I've included a2p.c generated by byacc-1.9. Larry, feel free to use your own from byacc-1.8 instead.
Diffstat (limited to 'x2p/str.c')
-rw-r--r--x2p/str.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/x2p/str.c b/x2p/str.c
index d42a59157c..33e4e97b2f 100644
--- a/x2p/str.c
+++ b/x2p/str.c
@@ -8,11 +8,11 @@
* $Log: str.c,v $
*/
-#include "handy.h"
#include "EXTERN.h"
-#include "util.h"
#include "a2p.h"
+#include "util.h"
+void
str_numset(str,num)
register STR *str;
double num;
@@ -64,6 +64,7 @@ register STR *str;
return str->str_nval;
}
+void
str_sset(dstr,sstr)
STR *dstr;
register STR *sstr;
@@ -78,6 +79,7 @@ register STR *sstr;
str_nset(dstr,"",0);
}
+void
str_nset(str,ptr,len)
register STR *str;
register char *ptr;
@@ -91,6 +93,7 @@ register int len;
str->str_pok = 1; /* validate pointer */
}
+void
str_set(str,ptr)
register STR *str;
register char *ptr;
@@ -107,6 +110,7 @@ register char *ptr;
str->str_pok = 1; /* validate pointer */
}
+void
str_chop(str,ptr) /* like set but assuming ptr is in str */
register STR *str;
register char *ptr;
@@ -119,6 +123,7 @@ register char *ptr;
str->str_pok = 1; /* validate pointer */
}
+void
str_ncat(str,ptr,len)
register STR *str;
register char *ptr;
@@ -134,6 +139,7 @@ register int len;
str->str_pok = 1; /* validate pointer */
}
+void
str_scat(dstr,sstr)
STR *dstr;
register STR *sstr;
@@ -144,6 +150,7 @@ register STR *sstr;
str_ncat(dstr,sstr->str_ptr,sstr->str_cur);
}
+void
str_cat(str,ptr)
register STR *str;
register char *ptr;
@@ -236,7 +243,7 @@ str_replace(str,nstr)
register STR *str;
register STR *nstr;
{
- safefree(str->str_ptr);
+ Safefree(str->str_ptr);
str->str_ptr = nstr->str_ptr;
str->str_len = nstr->str_len;
str->str_cur = nstr->str_cur;
@@ -261,6 +268,7 @@ register STR *str;
freestrroot = str;
}
+int
str_len(str)
register STR *str;
{