mirror of
https://github.com/lcn2/calc.git
synced 2025-08-19 01:13:27 +03:00
Release calc version 2.10.3t5.45
This commit is contained in:
33
string.h
33
string.h
@@ -1,15 +1,27 @@
|
||||
/*
|
||||
* Copyright (c) 1993 David I. Bell
|
||||
* Copyright (c) 1997 David I. Bell
|
||||
* Permission is granted to use, distribute, or modify this source,
|
||||
* provided that this copyright notice remains intact.
|
||||
*/
|
||||
|
||||
#ifndef CALCSTRING_H
|
||||
#define CALCSTRING_H
|
||||
|
||||
#if !defined(__CALCSTRING_H__)
|
||||
#define __CALCSTRING_H__
|
||||
|
||||
|
||||
#include "zmath.h"
|
||||
|
||||
|
||||
struct string {
|
||||
char *s_str;
|
||||
long s_len;
|
||||
long s_links;
|
||||
struct string *s_next;
|
||||
};
|
||||
|
||||
typedef struct string STRING;
|
||||
|
||||
|
||||
typedef struct {
|
||||
char *h_list; /* list of strings separated by nulls */
|
||||
long h_used; /* characters used so far */
|
||||
@@ -25,7 +37,18 @@ extern int findstr(STRINGHEAD *hp, char *str);
|
||||
extern char *charstr(int ch);
|
||||
extern char *addliteral(char *str);
|
||||
extern long stringindex(char *str1, char *str2);
|
||||
extern STRING *stralloc(void);
|
||||
extern long addstring(char *str, long len);
|
||||
extern STRING *charstring(int ch);
|
||||
extern STRING *makestring(char *str);
|
||||
extern STRING *makenewstring(char *str);
|
||||
extern STRING *findstring(long index);
|
||||
extern STRING *slink(STRING *);
|
||||
extern void sfree(STRING *);
|
||||
extern void fitstring(char *, long, long);
|
||||
extern void showstrings(void);
|
||||
extern void showliterals(void);
|
||||
extern STRING _nullstring_;
|
||||
|
||||
#endif
|
||||
|
||||
/* END CODE */
|
||||
#endif /* !__CALCSTRING_H__ */
|
||||
|
Reference in New Issue
Block a user