/* */
/* */
/* */
-/* (C) 2001-2002 Ullrich von Bassewitz */
+/* (C) 2001-2003 Ullrich von Bassewitz */
/* Römerstrasse 52 */
/* D-70794 Filderstadt */
/* EMail: uz@cc65.org */
+void SB_Move (StrBuf* Target, StrBuf* Source)
+/* Move the complete contents of Source to target. This will delete the old
+ * contents of Target, and Source will be empty after the call.
+ */
+{
+ /* Free the target string */
+ if (Target->Buf) {
+ xfree (Target->Buf);
+ }
+
+ /* Move all data from Source to Target */
+ *Target = *Source;
+
+ /* Clear Source */
+ InitStrBuf (Source);
+}
+
+
+
/* */
/* */
/* */
-/* (C) 2001-2002 Ullrich von Bassewitz */
+/* (C) 2001-2003 Ullrich von Bassewitz */
/* Römerstrasse 52 */
/* D-70794 Filderstadt */
/* EMail: uz@cc65.org */
return (Index < B->Len)? B->Buf[Index] : '\0';
}
#else
-# define SB_Peek(B,Index) (((Index) < (B)->Len)? (B)->Buf[(Index)] : '\0')
+# define SB_LookAt(B,Index) (((Index) < (B)->Len)? (B)->Buf[(Index)] : '\0')
#endif
#if defined(HAVE_INLINE)
* bytes.
*/
+void SB_Move (StrBuf* Target, StrBuf* Source);
+/* Move the complete contents of Source to target. This will delete the old
+ * contents of Target, and Source will be empty after the call.
+ */
+
/* End of strbuf.h */