~ubuntu-branches/ubuntu/utopic/coreutils/utopic-proposed

« back to all changes in this revision

Viewing changes to lib/savewd.h

  • Committer: Colin Watson
  • Date: 2013-10-30 15:48:33 UTC
  • mfrom: (8.3.5 sid)
  • Revision ID: cjwatson@canonical.com-20131030154833-xdt6e1yfffqom1c4
merge from Debian 8.21-1

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* Save and restore the working directory, possibly using a subprocess.
2
2
 
3
 
   Copyright (C) 2006, 2009-2012 Free Software Foundation, Inc.
 
3
   Copyright (C) 2006, 2009-2013 Free Software Foundation, Inc.
4
4
 
5
5
   This program is free software: you can redistribute it and/or modify
6
6
   it under the terms of the GNU General Public License as published by
23
23
#include <stdbool.h>
24
24
#include <sys/types.h>
25
25
 
 
26
_GL_INLINE_HEADER_BEGIN
 
27
#ifndef SAVEWD_INLINE
 
28
# define SAVEWD_INLINE _GL_INLINE
 
29
#endif
 
30
 
26
31
/* A saved working directory.  The member names and constants defined
27
32
   by this structure are private to the savewd module.  */
28
33
struct savewd
67
72
};
68
73
 
69
74
/* Initialize a saved working directory object.  */
70
 
static inline void
 
75
SAVEWD_INLINE void
71
76
savewd_init (struct savewd *wd)
72
77
{
73
78
  wd->state = INITIAL_STATE;
117
122
int savewd_restore (struct savewd *wd, int status);
118
123
 
119
124
/* Return WD's error number, or 0 if WD is not in an error state.  */
120
 
static inline int
 
125
SAVEWD_INLINE int
121
126
savewd_errno (struct savewd const *wd)
122
127
{
123
128
  return (wd->state == ERROR_STATE ? wd->val.errnum : 0);
145
150
                          int (*act) (char *, struct savewd *, void *),
146
151
                          void *options);
147
152
 
 
153
_GL_INLINE_HEADER_END
 
154
 
148
155
#endif