L-functions of curves