]> sourceware.org Git - systemtap.git/commitdiff
2006-05-30 Martin Hunt <hunt@redhat.com>
authorhunt <hunt>
Tue, 30 May 2006 15:50:27 +0000 (15:50 +0000)
committerhunt <hunt>
Tue, 30 May 2006 15:50:27 +0000 (15:50 +0000)
* string.stp (text_str): New.
(text_strn): New.

tapset/ChangeLog
tapset/string.stp

index fb25fd77328086308167c5f1dda2a6b69f2c7e96..3b376b0d3e161a25500f3dc0d7b8fedf7ea4d0e0 100644 (file)
@@ -1,3 +1,8 @@
+2006-05-30  Martin Hunt  <hunt@redhat.com>
+
+       * string.stp (text_str): New.
+       (text_strn): New.
+
 2006-05-26  Martin Hunt  <hunt@redhat.com>
 
        * errno.stp: Add octal option for returnstr.
index 19b8f81f88b3cba533246e125dd616929d5c99e3..a4cff3e45e00dc36c7f9e7133b59bb507741bfb6 100644 (file)
@@ -45,4 +45,23 @@ function isinstr:long(s1:string,s2:string) %{ /* pure */
        else
                THIS->__retvalue = 0;
 %}
+
+/*
+ * text_str()
+ *
+ * Takes a string, and any ASCII characters that are not printable are
+ * replaced by the corresponding escape sequence in the returned
+ * string.
+ */
+function text_str:string(input:string)
+%{ /* pure */
+       _stp_text_str(THIS->__retvalue, THIS->input, 0, 0);
+%}
+
+function text_strn:string(input:string, len:long, quoted:long)
+%{ /* pure */
+       _stp_text_str(THIS->__retvalue, THIS->input, THIS->len, THIS->quoted);
+%}
+
+
 /** @} */
This page took 0.030742 seconds and 5 git commands to generate.