File: filerw.mts

package info (click to toggle)
splint 1%3A3.1.2%2Bdfsg-5
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 21,004 kB
  • sloc: ansic: 150,869; yacc: 3,465; sh: 3,034; makefile: 2,157; lex: 412
file content (25 lines) | stat: -rw-r--r-- 784 bytes parent folder | download | duplicates (14)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
attribute filerw
   context reference FILE *
   oneof rw_none, rw_read, rw_write, rw_either
   annotations
      read ==> rw_read
      write ==> rw_write
      rweither ==> rw_either
      rwnone ==> rw_none
   merge
      rw_read + rw_write ==> rw_none
      rw_none + * ==> rw_none
      rw_either + rw_read ==> rw_read
      rw_either + rw_write ==> rw_write
      rw_either + rw_none ==> rw_none

   transfers
      rw_read as rw_write ==> error "Must reset file between read and write."
      rw_write as rw_read ==> error "Must reset file between write and read."
      rw_none as rw_read ==> error "File in unreadable state."
      rw_none as rw_write ==> error "File in unwritable state."

      rw_either as rw_write ==> rw_write
      rw_either as rw_read ==> rw_read

end