1 #ifndef _LINUX_SEQ_FILE_H
2 #define _LINUX_SEQ_FILE_H
14 struct seq_operations *op;
18 struct seq_operations {
19 void * (*start) (struct seq_file *m, loff_t *pos);
20 void (*stop) (struct seq_file *m, void *v);
21 void * (*next) (struct seq_file *m, void *v, loff_t *pos);
22 int (*show) (struct seq_file *m, void *v);
25 int seq_open(struct file *, struct seq_operations *);
26 ssize_t seq_read(struct file *, char *, size_t, loff_t *);
27 loff_t seq_lseek(struct file *, loff_t, int);
28 int seq_release(struct inode *, struct file *);
29 int seq_escape(struct seq_file *, const char *, const char *);
31 static inline int seq_putc(struct seq_file *m, char c)
33 if (m->count < m->size) {
34 m->buf[m->count++] = c;
40 static inline int seq_puts(struct seq_file *m, const char *s)
43 if (m->count + len < m->size) {
44 memcpy(m->buf + m->count, s, len);
52 int seq_printf(struct seq_file *, const char *, ...)
53 __attribute__ ((format (printf,2,3)));