[go: up one dir, main page]

File: free.h

package info (click to toggle)
findent 3.1.7-1
  • links: PTS
  • area: main
  • in suites: bullseye
  • size: 2,176 kB
  • sloc: sh: 4,746; cpp: 4,049; fortran: 1,565; pascal: 1,204; lex: 533; yacc: 305; makefile: 179; python: 155; lisp: 52
file content (40 lines) | stat: -rw-r--r-- 802 bytes parent folder | download
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#ifndef FREE_H
#define FREE_H

#include "fortran.h"
#include "debug.h"

class Free : public Fortran
{
   public:
      Free(Findent *f) : Fortran(f) { }

      void build_statement(Fortranline &line, bool &f_more, bool &pushback);

      void output(lines_t &lines, lines_t *freelines = 0);

      void output_converted(lines_t &lines);

   private:
      std::string rm_last_amp(const std::string &s);

      std::string insert_omp(const std::string s, std::string somp)
      {
	 if(is_omp)
	 {
	    std::string sl = s;
	    int l          = somp.length() - (sl+"x").find_first_not_of(' ');
	    sl             = blanks(l) + sl;
	    return sl.replace(0,somp.length(),somp);
	 }
	 else
	    return s;
      }

      bool        is_omp;
      std::string ompstr;
      std::string cmpstr;

};

#endif