2 also remove "editor acting weird" text since it's working now
source | link

Common Lisp, 104 bytes

Golfed:

(defun a(w h)(decf w 2)(flet((f(c)(format t"|~v@{~A~:*~}|~%"w|~%"(- w 2)c)))(f"-")(loop repeat(- h 2)do(f" "))(f"-")))

Ungolfed:

(Uhh, it's ignoring spaces at the beginning, and newlines too, when I paste the code. Not sure what's up with the website.)

(defun a (w h)
  (flet ((f (c) (format t "|~v@{~A~:*~}|~%" (- w 2) c)))
    (f "-")
    (loop repeat (- h 2) do
     (f " "))
    (f "-")))

Common Lisp, 104 bytes

Golfed:

(defun a(w h)(decf w 2)(flet((f(c)(format t"|~v@{~A~:*~}|~%"w c)))(f"-")(loop repeat h do(f" "))(f"-")))

Ungolfed:

(Uhh, it's ignoring spaces at the beginning, and newlines too, when I paste the code. Not sure what's up with the website.)

Common Lisp, 104 bytes

Golfed:

(defun a(w h)(flet((f(c)(format t"|~v@{~A~:*~}|~%"(- w 2)c)))(f"-")(loop repeat(- h 2)do(f" "))(f"-")))

Ungolfed:

(defun a (w h)
  (flet ((f (c) (format t "|~v@{~A~:*~}|~%" (- w 2) c)))
    (f "-")
    (loop repeat (- h 2) do
     (f " "))
    (f "-")))
1
source | link

Common Lisp, 104 bytes

Golfed:

(defun a(w h)(decf w 2)(flet((f(c)(format t"|~v@{~A~:*~}|~%"w c)))(f"-")(loop repeat h do(f" "))(f"-")))

Ungolfed:

(Uhh, it's ignoring spaces at the beginning, and newlines too, when I paste the code. Not sure what's up with the website.)