Skip to content
This repository has been archived by the owner on Jun 4, 2019. It is now read-only.

Commit

Permalink
common: allow c-- as extension of a filename in Common.filesuffix
Browse files Browse the repository at this point in the history
  • Loading branch information
pad committed Nov 1, 2010
1 parent 19f0db1 commit 3c37503
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion commons/common.ml
Expand Up @@ -2329,8 +2329,9 @@ module BasicType = struct
end


(* updated: added '-' in filesuffix because of file like foo.c-- *)
let (filesuffix: filename -> string) = fun s ->
(try regexp_match s ".+\\.\\([a-zA-Z0-9_]+\\)$" with _ -> "NOEXT")
(try regexp_match s ".+\\.\\([a-zA-Z0-9_-]+\\)$" with _ -> "NOEXT")
let (fileprefix: filename -> string) = fun s ->
(try regexp_match s "\\(.+\\)\\.\\([a-zA-Z0-9_]+\\)?$" with _ -> s)

Expand Down

0 comments on commit 3c37503

Please sign in to comment.